Closed Drup closed 7 years ago
This is also causing issues for a much simpler (and quite more common) pattern, in a .mli:
module type M = sig
...
end
include%server M
I have a prototype fix which repurpose Ident.rename
, which has for consequence that Subst
will shift things to the current side.... This is not extremely clean.
test case that exercises this:
module type%client S = sig
type t
val make : int -> char -> t
end
module%client M = String
module%client F (M : S) = struct type t = M.t * M.t end
module%client X = F(String)
module%client Y = F(M)
module%client N = struct
type t = int * string
let compare = compare
end
module%client SN = Map.Make(N)
let%client x : string = M.make 3 'f'
This works and is much cleaner now.
This doesn't work at the moment:
The issue is that
Map.Make
expects a module in scope base, not in scope server. We need to lift the module type into the server scope when lifting the module itself.