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
Type constraints
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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