From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA11780; Tue, 17 Jun 2003 17:55:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA12517 for ; Tue, 17 Jun 2003 17:55:50 +0200 (MET DST) Received: from walnut.he.net (walnut.he.net [64.71.137.114]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5HFtnH20526 for ; Tue, 17 Jun 2003 17:55:49 +0200 (MET DST) Received: from localhost (kmacy@localhost) by walnut.he.net (8.8.6p2003-03-31/8.8.2) with ESMTP id IAA27663; Tue, 17 Jun 2003 08:55:45 -0700 Date: Tue, 17 Jun 2003 08:55:45 -0700 (PDT) From: Kip Macy X-Sender: kmacy@walnut.he.net To: sicard@poleia.lip6.fr cc: caml-list@inria.fr Subject: Re: [Caml-list] lazy and marshal In-Reply-To: <51350.132.227.204.18.1055863264.squirrel@mailia.lip6.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam: no; 0.00; kip:99 caml-list:01 marshalling:01 thunk:01 marshalled:01 val:01 closures:01 bug:01 faq:01 beginner's:01 beginners:01 bin:01 caml-bugs:01 computed:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Marshal stores values or data structures, a lazy value by definition is one whose evaluation has been deferred. In order for the marshalling of lazy values to work, the thunk (or however deferred evaluation is handled in ocaml) and all the environment that it depends on would have to be marshalled. On Tue, 17 Jun 2003 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 = > # 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 > ------------------- 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