Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Jacques Garrigue
On Mon, Sep 6, 2010 at 6:39 PM, Daniel Bünzli wrote: > I think I just hit the same kind problem. > > This doesn't compile : > > module A : sig > type m > module M : sig >type t = m > end > end = struct > module M = struct >module S = String >module Smap = Map.Make(S) >type

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Daniel Bünzli
> The solution is easy enough: name all modules. In my example all modules are named. Can you maybe provide an explanation of what's happening ? Best, Daniel ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/li

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Hendrik Tews
Jacques Garrigue writes: On 2010/09/06, at 18:12, Hendrik Tews wrote: > I have a strange compilation problem, which I suspect to be a > compiler bug. Consider the following nested functor application The reason is that the typing of modules is not closed under substitution. I am re

Re: [Caml-list] functor substitution gives error

2010-09-07 Thread Jacques Garrigue
On 2010/09/06, at 18:12, Hendrik Tews wrote: > Hi, > > I have a strange compilation problem, which I suspect to be a > compiler bug. Consider the following nested functor application > > > module A(FreshGram : functor(Unit : sig end) -> Camlp4Syntax) : Camlp4Syntax = > FreshGram(struct end) >

Re: [Caml-list] functor substitution gives error

2010-09-06 Thread Daniel Bünzli
I think I just hit the same kind problem. This doesn't compile : module A : sig type m module M : sig type t = m end end = struct module M = struct module S = String module Smap = Map.Make(S) type t = int Smap.t end type m = M.t end Type declarations do not

[Caml-list] functor substitution gives error

2010-09-06 Thread Hendrik Tews
Hi, I have a strange compilation problem, which I suspect to be a compiler bug. Consider the following nested functor application module A(FreshGram : functor(Unit : sig end) -> Camlp4Syntax) : Camlp4Syntax = FreshGram(struct end) module B(FreshGram : functor(Unit : sig end) -> Camlp4Syntax)