I'm working on a bucklescript binding to leafletjs based on this project .
With leaflet a Map has a function to add layer and a Layer has a function to add itself to a map.
This is what I would like to achieve with ReasonML :
module Map = {
type t;
[@bs.send] external addLayer : (t, Layer.t) => t = "addLayer";
};
module Layer = {
type t;
[@bs.send] external addTo : Map.t => unit = "addTo";
};
Unfortunately I get an unbound module Layer error.
How do I make the compiler aware of the type described after ?