It would be great if you could expand on this. How would concrete code look like? What are the limitations?
So letās say I create the following file:
// Demo.res
module Button = {
@react.component
let make = () => {
<button/>
}
}
@react.component
let make = () => {
<div/>
}
So. What happens? I guess Demo.Button
and make
is hidden, unless I mark it as public:
export module Button = {
@react.component
let make = () => {
<button/>
}
}
@react.component
export let make = () => {
<div/>
}
As we can see above, Demo.Button
and Demo.make
would now be visible. But not Demo.Button.make
, we would need to export
that explicitly?
This also means that types are hidden by default:
// private
type t
export type something
Here you can see that types are private, unless I mark them as public. Or something like that.
For more advanced features like Functors I guess one would continue to use module signatures as we did before (so nothing new to learn).
I guess this kind of āspecā is what @Maxim is asking for.
Iād imagine there are quite some edge-cases that need to be considered here.