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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id BBFC6BC69 for ; Tue, 3 Jul 2007 07:46:37 +0200 (CEST) Received: from dorado.vub.ac.be (smtp.vub.ac.be [134.184.129.10]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l635kbXE011842 for ; Tue, 3 Jul 2007 07:46:37 +0200 Received: from exchange.etro.vub.ac.be (etro10.vub.ac.be [134.184.2.10]) by dorado.vub.ac.be (Postfix) with ESMTP id 0F63D453 for ; Tue, 3 Jul 2007 07:46:37 +0200 (CEST) Received: from ssel.vub.ac.be ([10.0.4.37]) by exchange.etro.vub.ac.be with Microsoft SMTPSVC(6.0.3790.3959); Tue, 3 Jul 2007 07:46:36 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by ssel.vub.ac.be (Postfix) with ESMTP id 76C4624682B8; Tue, 3 Jul 2007 07:46:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at ssel.vub.ac.be Received: from ssel.vub.ac.be ([127.0.0.1]) by localhost (ssel.vub.ac.be [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ITmLGIuRcv5n; Tue, 3 Jul 2007 07:46:30 +0200 (CEST) Received: from [192.168.2.2] (cable-87-244-185-212.upc.chello.be [87.244.185.212]) by ssel.vub.ac.be (Postfix) with ESMTP id 0053A24682B6; Tue, 3 Jul 2007 07:46:29 +0200 (CEST) In-Reply-To: <9b415f950707021504q6bad7f65o3adde4cdafea97d5@mail.gmail.com> References: <9b415f950707021504q6bad7f65o3adde4cdafea97d5@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <4B765D50-975E-42D7-B27B-7AADD10E57A0@vub.ac.be> Cc: Caml-list Content-Transfer-Encoding: 7bit From: Bruno De Fraine Subject: Re: [Caml-list] problem with camlp4 Date: Tue, 3 Jul 2007 07:46:22 +0200 To: "Benedikt Grundmann" X-Mailer: Apple Mail (2.752.3) X-OriginalArrivalTime: 03 Jul 2007 05:46:36.0905 (UTC) FILETIME=[85341D90:01C7BD35] X-Miltered: at discorde with ID 4689E2BD.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 grundmann:01 expr:01 expr:01 camlp:01 universiteit:01 vub:98 2007,:98 vub:98 wrote:01 caml-list:01 int:01 int:01 expression:02 ast:02 On 03 Jul 2007, at 00:04, Benedikt Grundmann wrote: > <:match_case< true -> $expr:num$ | $acc$ >> Do you mean this? <:match_case< true -> $int:string_of_int num$ >> Also notice that you can write <:expr< match $e$ with [ $list:l$ ] >> where l is of type "Camlp4.PreCast.Ast.match_case list". This can be easier than folding the expression with an accumulator. Regards, Bruno -- Bruno De Fraine Vrije Universiteit Brussel Faculty of Applied Sciences, DINF - SSEL Room 4K208, Pleinlaan 2, B-1050 Brussels tel: +32 (0)2 629 29 75 fax: +32 (0)2 629 28 70 e-mail: Bruno.De.Fraine@vub.ac.be