Version française
Home     About     Download     Resources     Contact us    
Browse thread
A functor to produce recursive modules ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Till Varoquaux <till.varoquaux@g...>
Subject: Re: [Caml-list] A functor to produce recursive modules ?
This is most definitely a bug in OCaml's type system. Ocaml is
amazingly robust but when you start using more exotic features bugs
occure ;-).

You should fill in a bug report at:
caml.inria.fr/mantis

Till
On Fri, May 23, 2008 at 8:42 PM, Fabrice Marchant
<fabrice.marchant@orange.fr> wrote:
>  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
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>



-- 
http://till-varoquaux.blogspot.com/