From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 205A1BC75 for ; Wed, 23 Feb 2005 00:32:50 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1MNWnMb027416 for ; Wed, 23 Feb 2005 00:32:49 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA06389 for ; Wed, 23 Feb 2005 00:32:49 +0100 (MET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j1MNWmgh003341 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 23 Feb 2005 00:32:49 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1D3jW9-0003Ut-00; Tue, 22 Feb 2005 23:32:37 +0000 Date: Tue, 22 Feb 2005 23:32:37 +0000 To: Oliver Bandel Cc: caml-list@inria.fr Subject: Re: [Caml-list] Camlp4 with traditional syntax (was: Camlp4 documentation) Message-ID: <20050222233237.GA13413@furbychan.cocan.org> References: <4215A18C.7040603@barettadeit.com> <4215AD36.1070303@cs.unisa.edu.au> <20050222102900.GA516@first.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050222102900.GA516@first.in-berlin.de> User-Agent: Mutt/1.3.28i From: Richard Jones X-Miltered: at nez-perce with ID 421BC121.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 421BC120.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 syntax:01 oliver:01 bandel:01 wrote:01 imho:01 syntax:01 infix:01 'list:01 'list:01 pcaml:01 expr:01 expr:01 notepad:01 lefta:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Tue, Feb 22, 2005 at 11:29:00AM +0100, Oliver Bandel wrote: > So, if the indended doc on Camlp4 would > explain in detail what it is good for, what it > provides and how to use it, I (and IMHO many others) > would gain a lot of such a documentation/tutorial. I too am eagerly awaiting a good tutorial on Camlp4. I've done a few things using Camlp4, and for me the syntax seems to be needlessly obscure. For example, here's how to write an infix 'map_with' operator, the syntax being: 'list map_with f' which is equivalent to 'List.map f list': open Pcaml EXTEND expr: AFTER "apply" [ LEFTA [ e1 = expr; "map_with"; e2 = expr -> <:expr< List.map $e2$ $e1$ >> ] ]; END Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com