Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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 =
   type t = int
   let f (x : M.t) = x

It's basically the same issue as described here:

- Andreas