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.0 required=5.0 tests=AWL,SPF_NEUTRAL 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 87376BC69 for ; Mon, 20 Aug 2007 15:49:36 +0200 (CEST) Received: from mx1.polytechnique.org (mx1.polytechnique.org [129.104.30.34]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7KDnaHX015229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Mon, 20 Aug 2007 15:49:36 +0200 Received: from localhost (is005115.intra.cea.fr [132.166.135.75]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTP id 1AB5733168 for ; Mon, 20 Aug 2007 15:49:33 +0200 (CEST) Date: Mon, 20 Aug 2007 15:49:32 +0200 From: Virgile Prevosto To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: instanciation of functor using command line Message-ID: <20070820154932.1494498d@localhost> In-Reply-To: <200708130853.36664.jon@ffconsultancy.com> References: <46BFA819.4010805@irisa.fr> <20070813071740.GA7554@zen> <200708130853.36664.jon@ffconsultancy.com> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.11; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AV-Checked: ClamAV using ClamSMTP at djali.polytechnique.org (Mon Aug 20 15:49:33 2007 +0200 (CEST)) X-Org-Mail: virgile.prevosto.1996@polytechnique.org X-Miltered: at discorde with ID 46C99BF0.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; functor:01 command-line:01 command-line:01 camlp:01 tutto:98 oggi:98 volta:98 parsing:01 caml-list:01 define:02 caml:02 argument:02 parse:02 output:02 module:03 Hello, Le lun 13 ao=C3=BB 2007 08:53:36 CEST, Jon Harrop a =C3=A9crit : > > Why not make a little (Caml) script that would parse the > > command-line (or an input file) and produce as output a file > > applying F to the selected implementations ? > > Parsing the command-line may not be that ugly: just define N lists, > > each containing the possible values for the module Mi, so that you > > just have to check that argument n is a member of the corresponding > > list. >=20 > You could also write a camlp4 macro to generate the code for you. >=20 In fact, I've written something like that some time ago. If someone is interested, I might try to find the code (and maybe adapt it to 3.10). --=20 E tutto per oggi, a la prossima volta. Virgile