From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B0383BBAF for ; Sat, 6 Feb 2010 13:18:22 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.49,418,1262559600"; d="scan'208";a="55949485" Received: from 91-168-176-178.rev.libertysurf.net (HELO [192.168.1.2]) ([91.168.176.178]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Feb 2010 13:18:21 +0100 Message-ID: <4B6D5D34.6070403@irisa.fr> Date: Sat, 06 Feb 2010 13:14:44 +0100 From: Tiphaine Turpin User-Agent: Thunderbird 2.0.0.19 (X11/20090216) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] camlp4 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; irisa:01 camlp:01 camlp:01 ocaml:01 functors:01 dependencies:01 cmo:01 wiki:01 syntax:01 whith:01 wiki:01 syntax:01 caml-list:01 functions:01 grep:01 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