From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA01708; Fri, 6 Sep 2002 13:15:56 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 NAA01685 for ; Fri, 6 Sep 2002 13:15:55 +0200 (MET DST) Received: from colt.epita.fr (colt.epita.fr [62.23.180.27]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g86BFs117884 for ; Fri, 6 Sep 2002 13:15:54 +0200 (MET DST) Received: from hermes.epita.fr (hermes.epita.fr [163.5.255.10]) by colt.epita.fr id g86BClY11603 Fri, 6 Sep 2002 13:12:47 +0200 (CEST) Received: from goa.lrde.epita.fr (mail@goa.lrde.epita.fr [10.223.13.2]) by hermes.epita.fr id g86BCke24972 Fri, 6 Sep 2002 13:12:46 +0200 (MEST) Received: from barcelona.lrde.epita.fr ([10.223.13.32] ident=mail) by goa.lrde.epita.fr with esmtp (Exim 3.35 #1 (Debian)) id 17nH4R-0001FJ-00; Fri, 06 Sep 2002 13:14:39 +0200 Received: from yann by barcelona.lrde.epita.fr with local (Exim 3.33 #1 (Debian)) id 17nHMW-00074y-00; Fri, 06 Sep 2002 13:33:20 +0200 Date: Fri, 6 Sep 2002 13:33:20 +0200 To: "Yaron M. Minsky" Cc: caml-list@inria.fr Subject: Re: [Caml-list] autoconf and caml Message-ID: <20020906113320.GA16693@barcelona.lrde.epita.fr> Reply-To: yann@lrde.epita.fr References: <20020905135720.D5343@pauillac.inria.fr> <20020905161617.A29272@kruuna.Helsinki.FI> <20020906104614.GE607@barcelona.lrde.epita.fr> <3D7889EA.8060406@cs.cornell.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3D7889EA.8060406@cs.cornell.edu> User-Agent: Mutt/1.3.25i From: =?iso-8859-1?Q?Yann_R=E9gis-Gianas?= Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Fri, Sep 06, 2002 at 06:56:42AM -0400, Yaron M. Minsky wrote: > Yes, but you actually don't really want simple values here, because > sometimes you want to use those values to do conditional compilation, > and ocaml values won't help you with that. > I think conditional compilation cannot be done since modules are not first class citizens. The only way I see is to introduce preprocessor comands with camlp4. The question is : what kind of conditional compilation do you want ? If you want something like: let foo x = #ifdef I_LOVE_FOO "foo" #else "bar" #endif It can be replaced by: open Config let foo x = if i_love_foo then "foo" else "bar" You will not pay a runtime cost because "i_love_foo" is a static value and unused code will be trimmed by ocaml compiler. -- Yann Régis-Gianas. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners