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
compiling camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-08 (10:34)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] compiling camlp4

On 4/8/07, Jeff Henrikson <> wrote:
> The "" from the documentation appears to not
> compile anymore with the latest camlp4 release.  Here's my attempt to
> make it work.


> from

I've updated it!


> The first thing I am reasonably sure needs changing is Sig.Syntax.S
> doesn't seem to exist anymore, and judging by the signature of the
> Register.SyntaxExtension functor, we want a Sig.SyntaxExtension.  If we
> make the parameter Syntax a Sig.Syntax then Make becomes a functor with
> signature Sig.SyntaxExtension.


> The next thing I figured out by looking at the translated
>, which is that
>     GLOBAL: foo
> needs to be
>     GLOBAL: foo;

It always had to be like that (even in the previous web page, strange...)

> To avert a syntax error.
> Likewise, the DELETE_RULE seems to upset the lexer with syntax errors:

Yes, the DELETE_RULE example was br0ken.


> And yet there is still a symbol not found:
> ~/src/camlp4-beta jehenrik$ ocamlc -I +camlp4 -I +camlp4/Camlp4Parsers
> -pp camlp4orf camlp4.cma -c
> File "", line 14, characters 2-29:
> Unbound module Camlp4.Sig.Camlp4Token
> Which is an unbound because in the current version Camlp4,
> Camlp4.Sig.Camlp4Token is a module type, not a module.  I have no idea
> what is intended here.

Yes just open Camlp4.Sig to see the token type now.

> BTW, my compilation string is:
> ocamlc -I +camlp4 -I +camlp4/Camlp4Parsers -pp camlp4orf camlp4.cma -c

-I +camlp4/Camlp4Parsers is useless since one doesn't use any
Camlp4*Parser module.

camlp4.cma no longer exists it's camlp4lib.cma but here it's also
useless since one doesn't link (-c)

ocamlc -I +camlp4 -pp camlp4orf -c

> So that's the best I can do.  Please help.  The application I want to
> write is not feasible in the old camlp4, but I suspect may be possible
> in the new.  Thanks for all the effort getting the system to the next level.

Thanks for your porting efforts!

Nicolas Pouillard