From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 2B084BC69 for ; Thu, 29 Mar 2007 18:10:57 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.233]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2TGAtw5020353 for ; Thu, 29 Mar 2007 18:10:56 +0200 Received: by nz-out-0506.google.com with SMTP id r28so180494nza for ; Thu, 29 Mar 2007 09:10:55 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YxtXGdk/dWMvKvMuLYoYYC2ECTa+rEbKeNp/wCKJyEvt2Bq23/OqLHFxn6Vjg3rRrZehXhEZ/rt2Xe+cbF4XoOFWiFOllZA9tEpvmqNNSBHY/IGmtSLfizCmzkQxKOxTo2gtnVwKTTMnWK2LutW7RELb+H63b8WRlzI7ospSb+M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gBZlHi4BOjNHNTA5J22tz+L3D1F2toRrKrz99EfOYlpPcNcS7a5luMp3pSA29fvR1w+nyNmyhXKOKkRRtSSq+L/p9YFu3TMb+qrnJ4f/Sr3rhHhoI0i0dVhahFm08WDMYGdWzYvkMcVTyH6lszanUusodyx0x8i4QShX47S7U0A= Received: by 10.114.75.1 with SMTP id x1mr325704waa.1175184654108; Thu, 29 Mar 2007 09:10:54 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Thu, 29 Mar 2007 09:10:53 -0700 (PDT) Message-ID: Date: Thu, 29 Mar 2007 18:10:53 +0200 From: "Nicolas Pouillard" To: "Hendrik Tews" Subject: Re: [Caml-list] camlp4 3.10 questions Cc: caml-list@yquem.inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17930.60913.933794.204656@tandem.cs.ru.nl> X-j-chkmail-Score: MSGID : 460BE50F.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 460BE50F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 hendrik:01 tews:01 tews:01 hendrik:01 sig:01 syntax:01 sig:01 camlp:01 syntax:01 expr:01 ctyp:01 iter:01 callbacks:01 expander:01 On 3/29/07, Hendrik Tews wrote: > "Nicolas Pouillard" writes: > > On 3/29/07, Hendrik Tews wrote: > > > > 1. What is the difference between Register.Printer and > > Register.OCamlPrinter? I guess it boils down to the difference > > between Sig.Syntax and Sig.Camlp4Syntax? > > Yes it's mainly a difference about what your printer really needs. If > you use the camlp4 AST then you need a Sig.Camlp4Syntax as argument, > if it's not needed then you can use Sig.Syntax. > > Does this mean I have to use Camlp4Syntax and OCamlPrinter it I > want to use quotations? Or do the quotations also work on > Sig.Syntax? You need Camlp4Syntax to use camlp4 quotations (like expr, patt, ctyp...). > > > 3. Register.declare_dyn_module puts all modules in a queue > > together with a function that contains some delayed side > > effects. Where are these function called? > > Camlp4Bin.ml > > Well, I was that far. But where in Camlp4Bin? It's done trough Register.iter_and_take_callbacks in the function called main. > > 5. I saw Camlp4OCamlOriginalQuotationExpander, presumably this is > > a quotation expander for quotations in original syntax. Is > > this already complete? > > Complete, not really but usable yes. > > Are there just corner cases missing or whole branches of the > syntax? Just corner cases, I hope. > > What is camlp4prof? > > A profiling toy. > > Well... profiling what? There is a filter (called Camlp4Profiler) that adds to all functions something like: let f x y z = body become: let f x y z = let () = Camlp4prof.count "f @ foo.ml line 42 ..." in body Then the camlp4prof module store all these calls and writes "camlp4_profiler.out" at exit. Running the camlp4prof program dumps that file. PS: For now that's just a toy. Best regards, -- Nicolas Pouillard