Browse thread
A functor to produce recursive modules ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Fabrice Marchant <fabrice.marchant@o...> |
| Subject: | Re: [Caml-list] A functor to produce recursive modules ? |
However, even if the method is clear, I run into problems trying to apply it on these 2 recursive modules :
map to sets and a set of map to sets.
module F ( X : Set.OrderedType ) = struct
module rec Mod : sig
module XSet :
sig
type elt = X.t
type t = Set.Make( X ).t
end
module XMap :
sig
type key = X.t
type 'a t = 'a Map.Make( X ).t
end
type elt = X.t
type t = XSet.t XMap.t
end
=
struct
module XSet = Set.Make( X )
module XMap = Map.Make( X )
type elt = X.t
type t = XSet.t XMap.t
end
and ModSet : Set.S with type elt = Mod.t = Set.Make( Mod )
end
Got this internal message from ocaml 3.10.1 :
"Fatal error: exception Assert_failure("typing/path.ml", 48, 22)"
Maybe should the a' type be declared (as XSet.t) ?
Any light ?
Fabrice