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 TAA15275; Tue, 17 Jun 2003 19:44:26 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA14631 for ; Tue, 17 Jun 2003 19:44:25 +0200 (MET DST) Received: from isis.lip6.fr (isis.lip6.fr [132.227.60.2]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h5HHiOT15040 for ; Tue, 17 Jun 2003 19:44:24 +0200 (MET DST) Received: from spi.lip6.fr (spi.lip6.fr [132.227.83.193]) by isis.lip6.fr (8.12.9/jtpda-5.4+victor) with ESMTP id h5HHiOGK016145 for ; Tue, 17 Jun 2003 19:44:24 +0200 X-pt: isis.lip6.fr Received: from inria.fr ([132.227.66.219]) by spi.lip6.fr (8.11.6/jtpda-5.2) with ESMTP id h5HHiI303415 ; Tue, 17 Jun 2003 19:44:18 +0200 Date: Tue, 17 Jun 2003 19:44:35 +0200 Subject: Re: [Caml-list] lazy and marshal Content-Type: text/plain; delsp=yes; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) Cc: caml-list@inria.fr To: sicard@poleia.lip6.fr From: Damien Doligez In-Reply-To: <51350.132.227.204.18.1055863264.squirrel@mailia.lip6.fr> Message-Id: <5C5EC6BE-A0EB-11D7-9A67-0003930FCE12@inria.fr> Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.552) X-Scanned-By: isis.lip6.fr X-Spam: no; 0.00; damien:01 caml-list:01 marshalling:01 val:01 closures:01 marshall:01 computed:01 int:01 toplevel:01 doligez:01 marshal:01 lazy:02 exception:02 string:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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 = > # 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