Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
camlp4 compilation model
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-25 (09:49)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] camlp4 compilation model
On Sat, Jan 24, 2009 at 09:15:43PM +0100, Mikkel Fahnøe Jørgensen wrote:
> It seems that an enduser program can link with a camlp4 enhanced
> library and magically have its syntax extended without adding camlp4
> to the build process (once the library has been built). For example
> the bitstring library introduces the bitmatch syntax.

No, this isn't so, at least not in bitstring.

You can link your program with bitstring.cma and get access to
the Bitstring.* library functions like the ones here:

but you cannot use the special bitmatch syntax without preprocessing
your source code with camlp4.

It's trivial to add the preprocessor if you use ocamlfind, so in
practice this is not a problem.


Richard Jones
Red Hat