Browse thread
[Caml-list] Lazy.Value
[
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: | Xavier Leroy <Xavier.Leroy@i...> |
| Subject: | Re: [Caml-list] 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. OK, I see what you mean. If "lazy e" had a special typing rule and a special compilation rule -- instead of being expanded into "ref (Lazy.Delayed (fun () -> e))" during parsing -- then it would be safe to treat it as generalizable, indeed. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr