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 q1LAN5g3002810 for ; Tue, 21 Feb 2012 11:23:05 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgkCAExvQ09KfVK2kGdsb2JhbABDFqBQkSkIIgEBAQEJCQ0HFAQjgXMBAQEEEgIsARsSCwEDDAYFCw0NISEBAREBBQEKEgYTEhCHZ5sFCotygnGFJD+IcwIFC4hxgnoaFQoGAgMGAwcCBhMChA0CBQISAQICgysElTiHF4N8BIMWPYQE X-IronPort-AV: E=Sophos;i="4.73,457,1325458800"; d="scan'208";a="132257256" Received: from mail-we0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 21 Feb 2012 11:23:00 +0100 Received: by werm13 with SMTP id m13so6571611wer.27 for ; Tue, 21 Feb 2012 02:23:00 -0800 (PST) Received-SPF: pass (google.com: domain of gabriel.scherer@gmail.com designates 10.181.13.113 as permitted sender) client-ip=10.181.13.113; Authentication-Results: mr.google.com; spf=pass (google.com: domain of gabriel.scherer@gmail.com designates 10.181.13.113 as permitted sender) smtp.mail=gabriel.scherer@gmail.com; dkim=pass header.i=gabriel.scherer@gmail.com Received: from mr.google.com ([10.181.13.113]) by 10.181.13.113 with SMTP id ex17mr24364513wid.15.1329819780320 (num_hops = 1); Tue, 21 Feb 2012 02:23:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Fz3V0qDCj6oIPxF57TZKinMfc5pzuvNtBdd9sUZovk4=; b=s7wHQBU/Pk6XYWCkBGda7DSOwvSIo67f+m3/R7PBL1O28XdcD3Hvnl4qgFQgfWg154 sRuXXoc7HzNWXbOKFmSb/2bKh2BtVE1n1lg0SeXr4WUu90bn9YP3ywOF/RwzIj/INWd+ LcqEz9pK820K0YQ9/RsyiuvNDh/eojCQvtMdY= Received: by 10.181.13.113 with SMTP id ex17mr20296526wid.15.1329819780224; Tue, 21 Feb 2012 02:23:00 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.63.13 with HTTP; Tue, 21 Feb 2012 02:22:20 -0800 (PST) In-Reply-To: References: From: Gabriel Scherer Date: Tue, 21 Feb 2012 11:22:20 +0100 Message-ID: To: bob zhang Cc: Caml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q1LAN5g3002810 Subject: Re: [Caml-list] Some utilities about camlp4 I had trouble being sure what "meta filter" you were talking about. Here's what I found out, in case other people on the list wondered the same: the "meta" part of Camlp4 is about turning a value into a piece of OCaml AST representing the syntax of this value. The "meta" filter is a kind of type-conv plugin -- anterior to type-conv -- that reads the declarations of algebraic datatypes and adds declarations for functions doing that "meta" work on this datatype, taking values at this type and returning pieces of Camlp4 AST. If I understand correctly, here is the change you did -- maybe you should put this information in a README somewhere: instead of reading the type declarations in the whole file being filtered, you only read those contained in a so-called "trash module", whose name is configurable by the user (default Camlp4Trash). You then produce declarations for metafunctions on demand, as in the old code, but you *do not* reproduce the content of the "trash module" -- the type declarations. Are there other notable differences between the two implementations? You said that the upstream one is "buggy", what kind of bugs did you encounter? It could be interesting to fix them upstream. It looks like you are doing this new implementation to be able to have the meta-functions defined in a different module than the original type declaration. What are the advantages of doing this? Could you tell us a bit more about your initial motivations? On Tue, Feb 21, 2012 at 12:58 AM, bob zhang wrote: > Hi, List >  the meta filter distributed with camlp4 is buggy and unmodular, I > put a modular one here >  http://seas.upenn.edu/~hongboz/meta_filter.zip > >  building with syntax extension is really easy provided this file >  http://www.seas.upenn.edu/~hongboz/myocamlbuild.ml > It works with .inferred.mli, .pp.ml as well > -- > Best, bob > > -- > Caml-list mailing list.  Subscription management and archives: > https://sympa-roc.inria.fr/wws/info/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >