Hi,
I need to define a Map type (keys of type Id
, values of type t
). It was working fine in ReasonML, however I’m unable to define the Map type in Rescript. Am I getting the syntax wrong?
module Id = {
type t =
| Id(int)
...
}
type t = {...}
module IdMap = {
type t = Id.t
include Comparator.Make({
type nonrec t = t
let compare = Id.compare
})
}
// getting error: Unbound module type IdMap
type myMap = Map.t<module(IdMap), t, IdMap.identity>
Why is the module type IdMap unbound? The module is defined right above. Am I getting the syntax wrong?
Thanks!