caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Florian Lorenzen <florian.lorenzen@tu-berlin.de>
To: caml-list@yquem.inria.fr
Subject: Implementation of lazy_t
Date: Mon, 10 Nov 2008 17:31:15 +0100	[thread overview]
Message-ID: <491861D3.8020709@tu-berlin.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 860 bytes --]

Hello,

I would like to know how lazy datatype constructors are implemented in
OCaml. A look into the documentation of the Lazy module revealed that
the compiler uses a built-in type constructor lazy_t for this
purpose. Unfortunately, I could not find any information on lazy_t on
the web. My question is how lazy datatypes are handled internally
(without having to read the compiler's source code). Especially, if
lazy_t implements call-by-need in the sense that once evaluated
objects are not evaluated again (by means of sharing) or if it
implements call-by-name like one can do by inserting 0-ary lambda
abstractions in the constructor to suspend evaluation and applying
them to force evaluation?

Is there any documentation on the internals available or can someone
shine some light on this?

Thanks a lot and best regards,

Florian


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

             reply	other threads:[~2008-11-10 16:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 16:31 Florian Lorenzen [this message]
2008-11-10 17:01 ` [Caml-list] " David Teller
2008-11-10 17:12 ` Mauricio Fernandez
2008-11-11  6:35   ` Andrej Bauer
2008-11-13 10:22   ` Florian Lorenzen

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=491861D3.8020709@tu-berlin.de \
    --to=florian.lorenzen@tu-berlin.de \
    --cc=caml-list@yquem.inria.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).