[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Yann_Régis-Gianas <yann@l...> |
| Subject: | Re: [Caml-list] autoconf and caml |
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