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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-06 (12:18)
From: Tiphaine Turpin <Tiphaine.Turpin@i...>
Subject: Re: [Caml-list] camlp4
Andy Ray a écrit :
> What should one do?
Complaining on the list about lack of camlp4 documentation is a good
start :-). To help you decide (and increase the pressure on the Ocaml
team), I would like to mention some of the difficulties that I
encountered when trying to understand camlp4 as a user:
- no overview of the organisation of the code (and no API either)
- the source folder tree is deep, and thus harder to grep
- the heavy use of functors obfuscates the dependencies (This is not a
remark against the design choice, but on readability in the absence of
documentation). Once you have found the implementation or interface of a
function that you need, you still have to find the path to the
appropriate module in PreCast which has it.
- a lot of .cmo and .cma, but what are their repective purposes ? This
is addressed in the wiki for the syntax extension part, but linking a
standalone program which uses camlp4 (even PreCast) to parse source
files is not so easy.

That being said, whith the wiki (whose structure is terrible) and a few
other google-suggested sources, you will get most of the informations
needed for the simplest use (syntax extension). Still, for a few grammar
entries, antiquotation names, and all basic manipulation functions
(locations, idents, etc.), you are on your own.

Two more links: