From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id A8F06BBFB for ; Tue, 21 Jun 2005 20:11:40 +0200 (CEST) Received: from mail.davidb.org (adsl-64-172-240-129.dsl.sndg02.pacbell.net [64.172.240.129]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j5LIBcjg004590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 Jun 2005 20:11:40 +0200 Received: from localhost ([127.0.0.1] helo=shadowdb.qualcomm.com) by mail.davidb.org with esmtp (Exim 4.43 #1 (Debian)) id 1DknDl-0001M0-CA; Tue, 21 Jun 2005 11:11:37 -0700 To: "Hendrik Tews" , caml-list@yquem.inria.fr Subject: Re: [Caml-list] OCaml IDE (Camlp4 for code formatting) References: Message-ID: Date: Tue, 21 Jun 2005 11:11:35 -0700 From: "David Brown" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Opera M2/8.0 (Linux, build 1095) X-Miltered: at nez-perce with ID 42B8585A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 hendrik:01 tews:01 tews:01 semantically:01 rewrites:01 wrote:01 tu-dresden:01 caml:02 ast:02 tcs:02 canonical:03 let:03 let:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: On Tue, 21 Jun 2005 08:18:26 -0700, Hendrik Tews wrote: > Not sure if you got me right: The two phrases "let _ = 5" and "5" > are semantically equivalent and probably compiled to the same > code. However, they have a different representation as a camlp4 > ast. Still the question remains, why camlp4 rewrites one into the > other. The phrase "5" has ambituities that aren't present with the "let _ = 5" so it makes sense for a canonical representation to use the let form. Compare the following: let _ = 5 let _ = 6 vs. 5 6 The first is valid, whereas the second causes an error trying to apply '5'. Dave