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=AWL 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 EB16CBC69 for ; Mon, 13 Aug 2007 12:37:48 +0200 (CEST) Received: from pih-relay04.plus.net (pih-relay04.plus.net [212.159.14.131]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7DAbmBq031429 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 13 Aug 2007 12:37:48 +0200 Received: from [80.229.56.224] (helo=beast.local) by pih-relay04.plus.net with esmtp (Exim) id 1IKUsS-0000ZT-IT for caml-list@yquem.inria.fr; Mon, 13 Aug 2007 09:02:16 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: instanciation of functor using command line Date: Mon, 13 Aug 2007 08:53:36 +0100 User-Agent: KMail/1.9.7 References: <46BFA819.4010805@irisa.fr> <20070813071740.GA7554@zen> In-Reply-To: <20070813071740.GA7554@zen> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200708130853.36664.jon@ffconsultancy.com> X-Miltered: at discorde with ID 46C0347C.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 ocaml:01 ocaml:01 frog:98 wrote:01 parsing:01 caml-list:01 define:02 caml:02 argument:02 parse:02 output:02 On Monday 13 August 2007 08:17:40 S=E9bastien Hinderer wrote: > Hey Thomas :) > > 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. You could also write a camlp4 macro to generate the code for you. =2D-=20 Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists/?e