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=2.8 required=5.0 tests=AWL,DNS_FROM_RFC_POST, 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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 8B0E4BB84 for ; Sat, 1 Nov 2008 11:41:17 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcDAN7OC0nAXQImgWdsb2JhbACTUz4BARYiqneKRAEDAQODToIE X-IronPort-AV: E=Sophos;i="4.33,526,1220220000"; d="scan'208";a="16745376" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 01 Nov 2008 11:41:17 +0100 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id mA1AfGWT032382 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 1 Nov 2008 11:41:17 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhUBABvPC0lIDtydkGdsb2JhbACTUz4BAQEBCQkMBxEDqniKRAEDAQODToIE X-IronPort-AV: E=Sophos;i="4.33,526,1220220000"; d="scan'208";a="31005318" Received: from fg-out-1718.google.com ([72.14.220.157]) by mail4-smtp-sop.national.inria.fr with ESMTP; 01 Nov 2008 11:41:16 +0100 Received: by fg-out-1718.google.com with SMTP id e21so1359358fga.25 for ; Sat, 01 Nov 2008 03:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer:sender; bh=1JbZH4w8dfDk82ZktUuiJ471783oAFmlMSFCFMmnZ+s=; b=R6cjUjEMzUNoqqhqqQbS2+f4Z877aICOdWCzvGRKWh8t1YPn+tCnVH2lNGRg4hvJ+i AgW9AKq5TZcN35CJdC+nSr69kPKHRD3n6m7hmr0TS6g0Z5Ar3RMeQp/6bEXWetwoGSLT ti0AoKkZSE9OL8LDKDn6X2cF0zINJKbvGQmpg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer:sender; b=mPCYPNfRVQ0054lkQ3n3R4GI6LRMFSFZqIgMTFE9lUGWGyRvWO5aIO0P+3kS4tpOKA d6ZhOerwmuYHAWSr1cC3VFB7LmBCuslu6hecaiyMte/jvMlzENgieWgpauSli1iOWphv A8byzg5hWXoam1v1d3IMpFpEVdP6s1e4ka7xg= Received: by 10.86.52.6 with SMTP id z6mr9115816fgz.20.1225536075947; Sat, 01 Nov 2008 03:41:15 -0700 (PDT) Received: from ?10.0.1.2? (15-107.1-85.cust.bluewin.ch [85.1.107.15]) by mx.google.com with ESMTPS id 3sm5542691fge.3.2008.11.01.03.41.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 01 Nov 2008 03:41:15 -0700 (PDT) Message-Id: <407B87C2-1300-440F-9C40-A656CF2446C2@erratique.ch> From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= To: OCaml Mailing List In-Reply-To: <490B7603.3010606@users.sourceforge.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: let rec and environment sharing Date: Sat, 1 Nov 2008 11:40:47 +0100 References: <490B7603.3010606@users.sourceforge.net> X-Mailer: Apple Mail (2.929.2) Sender: =?UTF-8?B?RGFuaWVsIELDvG56bGk=?= X-Miltered: at discorde with ID 490C324C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bunzli:01 buenzli:01 afaik:01 ocaml:01 infix:01 pointers:01 infix:01 ocaml:01 corresponds:01 recursive:01 compil:01 fermetures:01 rec:01 xleroy:01 dea:02 Le 31 oct. 08 =E0 22:17, Zheng Li a =E9crit : > AFAIK, the answer is yes. > > - I once saw this on a teaching slide of Xavier Leroy (I don't =20 > remember which one, but you can probably find it on his webpage) Maybe your thinking about this [1]. It states that ocaml uses minimal =20= environments hence my second example shouldn't leak. > Btw, it is called infix pointers, and there's a "infix" tag for =20 > OCaml block value. If this corresponds to what is described in the same document. Then =20 the mutually recursive definitions should share the same environment. Thanks, Daniel [1] http://pauillac.inria.fr/~xleroy/dea/compil/fermetures