Browse thread
[Caml-list] mutually recursive modules, strange behaviour in signature
- Shaddin Doghmi
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Shaddin Doghmi <shaddin@m...> |
| Subject: | [Caml-list] mutually recursive modules, strange behaviour in signature |
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