Version française
Home     About     Download     Resources     Contact us    
Browse thread
Recursive module signatures + functors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: rossberg@p...
Subject: Re: [Caml-list] Recursive module signatures + functors
Michael Furr wrote:
>
> Is this a bug in the type checker or is there a reason that it does not
> unify 't' and 'M.t'?

It is not a bug, but a limitation of the current semantics of recursive
modules. It is unrelated to functors - here is a simpler version of your
example that fails in the same way:

module rec M : sig type t val f : t -> t end =
struct
   type t = int
   let f (x : M.t) = x
end

It's basically the same issue as described here:

http://caml.inria.fr/pub/ml-archives/caml-list/2007/05/d9414d45a9a6f30f2609e08c43f011a0.en.html

- Andreas