caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kip Macy <kmacy@fsmware.com>
To: sicard@poleia.lip6.fr
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] lazy and marshal
Date: Tue, 17 Jun 2003 08:55:45 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.21.0306170849170.17577-100000@walnut.he.net> (raw)
In-Reply-To: <51350.132.227.204.18.1055863264.squirrel@mailia.lip6.fr>

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

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


  reply	other threads:[~2003-06-17 15:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-17 15:21 sicard
2003-06-17 15:55 ` Kip Macy [this message]
2003-06-17 17:44 ` Damien Doligez
2003-06-19  9:46   ` Pierre Weis
2003-06-19 12:46     ` Damien Doligez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.21.0306170849170.17577-100000@walnut.he.net \
    --to=kmacy@fsmware.com \
    --cc=caml-list@inria.fr \
    --cc=sicard@poleia.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).