Browse thread
Map.fold behavior changed
-
EEK Cooper
- Nathaniel Gray
- Jean-Christophe Filliatre
- Brian Hurt
[
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: | Nathaniel Gray <n8gray@g...> |
| Subject: | Re: [Caml-list] Map.fold behavior changed |
On 2/24/06, EEK Cooper <s0567141@sms.ed.ac.uk> wrote: > Hi all, > > My team just noticed that the behavior of Map.fold changed in OCaml > version 3.08.4. > [snip > That said, we're now in the position where we need to compile different > code depending on the version of OCaml. What's the best way to do > conditional compilation in OCaml? Should we use cpp and #ifdef, or is > there a more OCaml-savvy solution? Copy/paste. Take the implementation you like, copy it, call it MyMap, and use a sed script to change Map to MyMap in your code. Quick? Yes. Effective? Yes. Elegant? Not so much. BTW, cpp won't work because of the lexical differences between ocaml and C. OTOH, I think there may be a camlp4 module that implements cpp-like ifdefs. Cheers, -n8 -- >>>-- Nathaniel Gray -- Caltech Computer Science ------> >>>-- Mojave Project -- http://mojave.cs.caltech.edu -->