NAlec
1
Hi,
I am building a library, with a .mli file. The signature of one the function requires a StringMap (Map of Strings) produced with :
module StringMap = Map.Make (String)
Dune does not like this line and says :
Syntax error
showing the first parenthesis
What is wrong with this ?
It needs to be a module type:
module StringMap : Map.S with type elt = string
NAlec
3
Thanks, indeed it makes sense to have types in .mli file.
It should be with type key = string
rather than elt
…
1 Like
FYI your first try was not that far as this can also be written module StringMap : module type of Map.Make(String)
1 Like