[
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: | Damien Doligez <Damien.Doligez@i...> |
| Subject: | Re: [Caml-list] lazy and marshal |
On Tuesday, June 17, 2003, at 05:21 PM, sicard@poleia.lip6.fr wrote: > Hello > I don't understand the following error : > Marshalling a lazy value don't work when the value has not been > computed. > > > # let a = lazy 0;; > val a : int lazy_t = <lazy> > # Marshal.to_string a [ Marshal.Closures ] ;; > Exception: Invalid_argument "output_value: abstract value". > > # Lazy.force a;; > - : int = 0 > # Marshal.to_string a [ Marshal.Closures ] ;; > - : string = > "\132\149??\000\000\000\001\000\000\000\000\000\000\000\000\000\000\000 > \000@" > # # Marshal.to_string (fun x -> x) [ Marshal.Closures ];; You cannot marshall the functional values that are compiled by the toplevel. This is a limitation of the toplevel, not lazy values. -- Damien ------------------- 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