caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nathaniel Gray" <n8gray@gmail.com>
To: "EEK Cooper" <s0567141@sms.ed.ac.uk>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Map.fold behavior changed
Date: Tue, 28 Feb 2006 21:20:20 -0800	[thread overview]
Message-ID: <aee06c9e0602282120t6e14ce18ne6b64dd26bc33dbf@mail.gmail.com> (raw)
In-Reply-To: <20060224112209.51szurk2dc00oggg@www.sms.ed.ac.uk>

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 -->


  parent reply	other threads:[~2006-03-01  5:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-24 11:22 EEK Cooper
2006-02-24 11:43 ` [Caml-list] " Jean-Christophe Filliatre
2006-02-24 13:29   ` EEK Cooper
2006-02-24 13:44     ` Jean-Christophe Filliatre
2006-02-24 14:13     ` Damien Doligez
2006-02-24 15:43       ` Brian Hurt
2006-02-24 16:20         ` Jean-Christophe Filliatre
2006-02-24 16:01       ` Joaquin Cuenca Abela
2006-02-27 12:59         ` Damien Doligez
2006-03-02 13:57           ` Ezra Cooper
2006-03-03 15:41             ` N. Owen Gunden
2006-03-09  7:14               ` Florian Hars
2006-03-13 16:31                 ` Damien Doligez
2006-03-15  7:27                   ` Florian Hars
2006-03-15  7:37                     ` Jon Harrop
2006-03-15  7:40                     ` Alain Frisch
2006-03-15  8:41                       ` Florian Hars
2006-03-15 21:18                         ` Christophe Raffalli
2006-02-24 15:31 ` Brian Hurt
2006-03-01  5:20 ` Nathaniel Gray [this message]
2006-03-01  9:33   ` Nicolas Pouillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aee06c9e0602282120t6e14ce18ne6b64dd26bc33dbf@mail.gmail.com \
    --to=n8gray@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=s0567141@sms.ed.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).