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=1.1 required=5.0 tests=AWL,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 discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 906EABC69 for ; Wed, 28 Mar 2007 14:30:39 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2SCUdNL022382 for ; Wed, 28 Mar 2007 14:30:39 +0200 Received: by ug-out-1314.google.com with SMTP id q2so220172uge for ; Wed, 28 Mar 2007 05:30:39 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ht0xoKCvXkUxTZXDLLM/tTKWVgpaVpWZOAaWMk7HhhRIsEKfiIvfxSO5UlRa4fcVQ2LWuox4up5Vr8tFBdb72P1rCZmeoN6XZ7UUyJOrsum5UTAssBLwwrxS1rHko6cEynWP5W8E8C4R5SXqM3uuXvudo5HoJNVeDqMYE7E3R+s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tkePmlGLY/vTKPJ0kopfVBjKbk/cqaMy1gjvtYfofTyvTvP6Qjfcpioh/YW0t1Kn8zQjuKF5AkFLoKB/Tbp+xSRsAlDUAkoXVPQ28WIkX3AnH9NRqA9avae4l8mf4ebTSIAo+uETf5PWZI2soBgbAMPs0x2oqzVVime098SKlu4= Received: by 10.114.155.1 with SMTP id c1mr3678072wae.1175085037719; Wed, 28 Mar 2007 05:30:37 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Wed, 28 Mar 2007 05:30:37 -0700 (PDT) Message-ID: Date: Wed, 28 Mar 2007 14:30:37 +0200 From: "Nicolas Pouillard" To: "Loup Vaillant" Subject: Re: [Caml-list] Misunderstandings about the AST Cc: "Caml mailing list" In-Reply-To: <6f9f8f4a0703272342k6a263784r9a4ecd84d229caa4@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6f9f8f4a0703270644r52490af8ieeedb8f474b95f8e@mail.gmail.com> <6f9f8f4a0703271034m3be7cdc8t43708c8a8a2144ce@mail.gmail.com> <6f9f8f4a0703272342k6a263784r9a4ecd84d229caa4@mail.gmail.com> X-j-chkmail-Score: MSGID : 460A5FEF.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 460A5FEF.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; pexp:01 semantically:01 expr:01 expr:01 wrote:01 wrote:01 syntactic:01 constructor:01 caml-list:01 delayed:01 lazy:02 lazy:02 expression:02 expression:02 ast:02 On 3/28/07, Loup Vaillant wrote: > Thank you for your help, I will get back to work. > > 2007/3/27, Nicolas Pouillard : > > On 3/27/07, Loup Vaillant wrote: > > > | Pexp_lazy of expression > > > Why does this constructor even exist? Are some specific optimizations made? > > > > Since the evaluation of the expression is delayed it's not a plain function. > > Actually, I knew that. > However, given the following expressions are semantically equivalent: > > lazy expr;; > lazy_from_fun (fun () -> expr);; > > With "lazy_from_fun" being a plain function, > my point is then to know if they are really equivalent > (e.g. implementation wise), so I can assume > the keyword "lazy" is just syntactic sugar. I think that's safe to assume it. -- Nicolas Pouillard