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.9 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, 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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 89B1BBBAF for ; Mon, 15 Dec 2008 17:10:30 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.36,224,1228086000"; d="scan'208";a="20403111" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Dec 2008 17:10:30 +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 mBFGAT5v004620 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 15 Dec 2008 17:10:30 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmEGACcQRknVBJXyY2dsb2JhbACBbJFdFwgLBxEFuRSCfg X-IronPort-AV: E=Sophos;i="4.36,224,1228086000"; d="scan'208";a="32678244" Received: from outmailhost.telefonica.net (HELO ctsmtpout1.frontal.correo) ([213.4.149.242]) by mail4-smtp-sop.national.inria.fr with ESMTP; 15 Dec 2008 17:10:29 +0100 Received: from NANA.localdomain (83.60.154.100) by ctsmtpout1.frontal.correo (7.2.056.6) (authenticated as ferferse$telefonica.net) id 49426D38000CE071 for caml-list@inria.fr; Mon, 15 Dec 2008 17:10:28 +0100 Received: from mfp by NANA.localdomain with local (Exim 4.69) (envelope-from ) id 1LCG1b-0006J2-Tk for caml-list@inria.fr; Mon, 15 Dec 2008 17:10:27 +0100 Date: Mon, 15 Dec 2008 17:10:27 +0100 From: Mauricio Fernandez To: caml-list@inria.fr Subject: Re: [Caml-list] Using camlp4 in extensions Message-ID: <20081215161027.GC20626@NANA.localdomain> Mail-Followup-To: caml-list@inria.fr References: <494663F2.7090409@mcmaster.ca> <20081215152447.GA11765@annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081215152447.GA11765@annexia.org> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Miltered: at discorde with ID 49468175.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 camlp:01 afaik:01 ifdef:01 syntax:01 cmo:01 ocamlc:01 -pp:01 ocamlc:01 -pp:01 cmo:01 wrote:01 wrote:01 caml-list:01 lazy:02 On Mon, Dec 15, 2008 at 03:24:47PM +0000, Richard Jones wrote: > On Mon, Dec 15, 2008 at 09:04:34AM -0500, Jacques Carette wrote: > > Question: is there a way to use a camlp4 extension *inside* the > > definition of another? > > > > AFAIK, extensions are not ordered, so trying to use camlp4 to deal with > > IFDEF in the source of a syntax extension (like pa_monad) to switch > > between 3.10 and 3.11 [to deal with the new private and lazy features] > > does not seem possible. Or have I missed something? > > camlp4 extensions should be composable (as long as they don't actually > conflict with each other). Just list several *.cmo files on the > camlp4 command line. What happened when you tried it? I believe he's not referring to simultaneous use of pa_monad and another extension in user code, but of Camlp4MacroParser *in* the sources of pa_monad. Since pa_monad is build with ocamlc -I +camlp4 -pp camlp4orf -c pa_monad.ml changing that to ocamlc -I +camlp4 -pp "camlp4orf Camlp4MacroParser.cmo" -c pa_monad.ml might work. -- Mauricio Fernandez - http://eigenclass.org