English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
instanciation of functor using command line
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-08-13 (10:37)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Re: instanciation of functor using command line
On Monday 13 August 2007 08:17:40 Sébastien 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.

Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists