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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: sicard@p...
Subject: [Caml-list] lazy and marshal
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@"
#

Thanks

-------------------
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