From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: *** X-Spam-Status: No, score=3.4 required=5.0 tests=DNS_FROM_SECURITYSAGE, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 20BB2BB84 for ; Mon, 10 Nov 2008 17:31:18 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwBAM7wF0lKfU4Yimdsb2JhbACTZj4BAQEKCQwHDwWrSYpTAQSFYA X-IronPort-AV: E=Sophos;i="4.33,575,1220220000"; d="asc'?scan'208";a="31326378" Received: from ey-out-2122.google.com ([74.125.78.24]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Nov 2008 17:31:17 +0100 Received: by ey-out-2122.google.com with SMTP id 6so908141eyi.15 for ; Mon, 10 Nov 2008 08:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :sender; bh=F5zfBHxbBVHytzwOx7gxqtZ1KMMPhe5HxiDj/leWHsw=; b=Wn9o/+dAJw6U14lqmBJncAQUAzCmmSRRRyKYTuPS9BELoG8ivOFAYHjdXzwg2kU5FF zlK9KuRdqtKNRihtM5K0M5R7xQjM19hWzyv7XTUV961GSIu4WrqyWz2o1SOHmH/3Imkf tmZhUpHabVkXGdesO4DhbYHuVSbyHb7nwlD+E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:sender; b=H4NBQu4i4Lx8ovTOKNr2rJ2G7zxugTxYebRWJnHUkUPEFMDC1fI74spbG5uWZqjZj2 W6Qkhta4fJjTTnPIzqgChATDswGwfz7ggDMPcKaq9X1gITFDbtWDnr0d1tqMCyHISyTy rT5pUAOrKPaT6Oq/MpLDg4994QTst19QUWghc= Received: by 10.187.175.6 with SMTP id c6mr1932085fap.44.1226334676991; Mon, 10 Nov 2008 08:31:16 -0800 (PST) Received: from ?130.149.24.207? (gilgalad.uebb.cs.tu-berlin.de [130.149.24.207]) by mx.google.com with ESMTPS id 12sm166907fks.9.2008.11.10.08.31.15 (version=SSLv3 cipher=RC4-MD5); Mon, 10 Nov 2008 08:31:16 -0800 (PST) Message-ID: <491861D3.8020709@tu-berlin.de> Date: Mon, 10 Nov 2008 17:31:15 +0100 From: Florian Lorenzen User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Implementation of lazy_t X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig59860A1299D37CFAE6152127" Sender: Florian Lorenzen X-Spam: no; 0.00; tu-berlin:01 datatype:01 constructors:01 ocaml:01 compiler:01 datatypes:01 implements:01 implements:01 inserting:01 lambda:01 constructor:01 constructor:01 lazy:02 lazy:02 implemented:02 X-Attachments: type="application/pgp-signature" name="signature.asc" name="signature.asc" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig59860A1299D37CFAE6152127 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 --------------enig59860A1299D37CFAE6152127 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkkYYdMACgkQvjzICpVvX7ZDMQCfck6FxgNmeNNO60QhuH82uS+u aycAnjkvBsWUVHAGgiLsynNy7wqEglSB =j9Jc -----END PGP SIGNATURE----- --------------enig59860A1299D37CFAE6152127--