Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Lazy.Value
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] Lazy.Value
> > I may say nonsense, but is it possible to generalize things like:
> >    ref (Lazy.Value [])
> 
> No, this would be unsound -- like all polymorphic references.

I know, and I knew perfectly your example, but for Lazy, it is
different. The structure of this type is visible only because it is
necessary for the "lazy" statement. Users are not supposed to change
the reference value by hand.

And when the "Value" is obtained, the lazy is no more changed by Lazy.force.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr