Version française
Home     About     Download     Resources     Contact us    
Browse thread
camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
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:
http://nicolaspouillard.fr/camlp4-changes.html
http://www.ocaml-tutorial.org/camlp4_3.10

Tiphaine