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 01085BC0A for ; Fri, 6 Apr 2007 02:52:09 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.224]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l360q9gn001529 for ; Fri, 6 Apr 2007 02:52:09 +0200 Received: by nz-out-0506.google.com with SMTP id l8so438925nzf for ; Thu, 05 Apr 2007 17:52:08 -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=Vu2uDq8Ak+d/x5x2a4oGHeiYnMRhMLhliPKMZvqyQHWrivsIFjjZcRa/ggdHaEtf/ceuLsFTo4Ja+uhNcomb9Or+VUYDaFkFtm9flH1io2FNevGFIwus3I8mlT2tmUuv0h/JvNogqp+PUrIl4LHkUTDyfDzkqBPfaOpgG9UOn5s= 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=RL2/f9bTYlCvASOhcDWQ9G+bCXTRAiZgpnFID+pshghUc8cRoGUL2Sqiy6o/CRNDcWHcU+NA2nlYd5F+tnmyVW/KiGP6mu3EgSoo6wQkTfWf3GNxwjpGA9Ck7F/WeDAQ6533Tq3HpV+B+xYDF8WmIIolNxxxjE/zPRANGxcmxZM= Received: by 10.114.81.1 with SMTP id e1mr989978wab.1175820728400; Thu, 05 Apr 2007 17:52:08 -0700 (PDT) Received: by 10.114.181.18 with HTTP; Thu, 5 Apr 2007 17:52:08 -0700 (PDT) Message-ID: Date: Fri, 6 Apr 2007 02:52:08 +0200 From: "Nicolas Pouillard" To: "Hendrik Tews" Subject: Re: [Caml-list] 2 camlp4 questions Cc: caml-list@inria.fr In-Reply-To: <17941.26750.232997.697322@tandem.cs.ru.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17941.26750.232997.697322@tandem.cs.ru.nl> X-j-chkmail-Score: MSGID : 461599B9.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 461599B9.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 hendrik:01 tews:01 tews:01 camlp:01 expr:01 expr:01 node:01 cheers:01 wrote:01 caml-list:01 bin:01 tuple:02 expression:02 match:02 On 4/5/07, Hendrik Tews wrote: > Hi, > > I am still reading the camlp4 sources: > [... an already answered question ...] > 2. Camlp4Bin calls a cleaning pass before printing. The cleaner > does things like > > <:expr< $e$; $ <:expr<>> $ >> -> self#expr e > > What do these empty quotations ``<:expr<>>'' stand for? Are > these just the things that filters leave behind if they delete > a node? Yes it can be some filters junks, but not only. If you construct something like a sequence, a tuple, a sum type (everything that was a list before), you will often want to use some folding style and then these nil quotations will be helpful as initial values. At some other points these nil quotations are not useless (and so not removed by that cleaner phase). For instance, if there is no guard in a match that's represented by an nil expression: <:match_case< $p$ -> $e$ >> = <:match_case< $p$ $when:<:expr<>>$ -> $e$ >> Cheers, -- Nicolas Pouillard