* [Caml-list] mutually recursive modules, strange behaviour in signature
@ 2004-08-15 17:01 Shaddin Doghmi
0 siblings, 0 replies; only message in thread
From: Shaddin Doghmi @ 2004-08-15 17:01 UTC (permalink / raw)
To: caml-list
In ocaml 3.07 and 3.08, it seems that in the signature of a module one
can not refer to a module type defined in a mutually recursive module.
This example does not compile:
-------------------------------------
# module rec A:
sig
module type w=sig end
end=
struct
module type w = sig end
end
and B:
sig
module Z(X:A.w):sig end
end =
struct
module Z (X:A.w)=struct end
end
;;
Characters 131-134:
module Z(X:A.w):sig end
^^^
Unbound module type A.w
-----------------------------------------------
however, this one does compile just fine:
---------------------------------
# module rec A:
sig
module type w=sig end
end=
struct
module type w = sig end
end
and B:
sig
module Z(X:sig end):sig end
end =
struct
module Z (X:A.w)=struct end
end
;;
-------------------------------
is there a reason why this happens?
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-15 17:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-15 17:01 [Caml-list] mutually recursive modules, strange behaviour in signature Shaddin Doghmi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox