Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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:

http://et.redhat.com/~rjones/bitstring/html/Bitstring.html#reference

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.

Rich.

-- 
Richard Jones
Red Hat