Browse thread
Type constraints
[
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: | 2004-12-08 (10:53) |
From: | Damien Doligez <damien.doligez@i...> |
Subject: | Re: [Caml-list] Type constraints |
On 7 Dec 2004, at 22:43, Alain Frisch wrote: > Damien Doligez wrote: > >> So the answer to your original question is: the type is not >> generalized >> because in some cases the let-module construct is not safely >> polymorphic. [...] > So I don't understand why the same cannot apply to local modules. If > the let-module-in were declared "safe" for the value restriction, > shouldn't > > let module M = struct let v = ref [] end in M.v > > yield a non-generalized type for the same reason as for the non-local > case (and not because of the value restriction) ? Hmmm... Now I don't know whether it's safe or not, and I don't know whether someone checked its safety before excluding it from the value restriction code... -- Damien