From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q4CGMC7f007634 for ; Sat, 12 May 2012 18:22:12 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmEDADGLrk9QW+UDgWdsb2JhbABEFqFakgAiAQEWJieCGjokgQ4TRwgBAYd7AQ4EB5lTjw6HMAoZgQuIfI18gyYElX2TRQ X-IronPort-AV: E=Sophos;i="4.75,576,1330902000"; d="scan'208";a="143585474" Received: from plane.gmane.org ([80.91.229.3]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 12 May 2012 18:22:06 +0200 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1STF54-0003ff-6s for caml-list@inria.fr; Sat, 12 May 2012 18:22:06 +0200 Received: from seas1108.wireless-pennnet.upenn.edu ([158.130.108.86]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 May 2012 18:22:06 +0200 Received: from bobzhang1988 by seas1108.wireless-pennnet.upenn.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 May 2012 18:22:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Hongbo Zhang Date: Sat, 12 May 2012 12:21:52 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: seas1108.wireless-pennnet.upenn.edu User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 Subject: [Caml-list] some camlp4 documentations Hi, List I have read camlp4 source tree for quite a long time, and compiled it here http://www.seas.upenn.edu/~hongboz/hongbo_zhang_files/temp.pdf It's still preliminary, and contains many errors. my 2 cents: 1. don't use camlp4 for 3.12.0 (too many bugs there), it's fine in 3.12.1 2. spend some time in ocamlbuild (covered in chap2), it's very easy to build any camlp4 extension, (not as hard as you thought) 3. write a quick hack extension is straight-foward. a robust extesnsion is not easy. But, due to the fact that your camlp4Ast will be dumped to ocamlast, and to typedtree, the bug will be found later in most cases, so it's still a very powerful tool