caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "Hendrik Tews" <H.Tews@cs.ru.nl>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] camlp4 3.10 questions
Date: Thu, 29 Mar 2007 23:57:59 +0200	[thread overview]
Message-ID: <cd67f63a0703291457w71a7914blfadf6647f032b767@mail.gmail.com> (raw)
In-Reply-To: <wwulkhfrace.fsf@tandem.cs.ru.nl>

On 3/29/07, Hendrik Tews <H.Tews@cs.ru.nl> wrote:
> "Nicolas Pouillard" <nicolas.pouillard@gmail.com> writes:
>
>    > 2. There are various maps and folds on asts in Sig.Camlp4Ast. How
>    >    can I use them?
>
>    2/ There is a lot of shortcuts to made the use of them easier when one
>    just want to hook up only one thing (expressions for instance).
>
>    The same example.
>
>    open Camlp4.PreCast
>    let f = Ast.map_expr begin function
>        | <:expr< $x$ + 0 >> | <:expr< 0 + $x$ >> -> x
>        | e -> e
>    end in
>    AstFilters.register_str_item f#str_item
>
> That should be  AstFilters.register_str_item f ?

Nop, giving the up to date signature of Ast.map_exp:

value map_expr : (expr -> expr) -> map;

A map value is an object that waits for a starting order.

f#str_item <:str_item< ... >>;

f#expr <:expr< ... >>;

...

Since AstFilters.register_str_item waits for a (str_item -> str_item)
function I give it f#str_item.

>    > 8. How can I process multiple files with the same camlp4 process?
>
>    As always ?
>
> How is as always? Two files on the command line give the usage
> info:
>
>     camlp4o printer.cmo test.ml printer.ml
>     Usage: camlp4 [load-options] [--] [other-options]
>     Options:
>         ....

You're right only one file (implem or interf).
So you can't by command line.

-- 
Nicolas Pouillard


  reply	other threads:[~2007-03-29 21:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-28 22:36 Hendrik Tews
2007-03-29  9:48 ` [Caml-list] " Nicolas Pouillard
2007-03-29 15:50   ` Hendrik Tews
2007-03-29 16:10     ` Nicolas Pouillard
2007-03-29 21:47   ` Hendrik Tews
2007-03-29 21:57     ` Nicolas Pouillard [this message]
2007-03-30 11:13       ` Hendrik Tews
2007-03-30 16:13         ` Nicolas Pouillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd67f63a0703291457w71a7914blfadf6647f032b767@mail.gmail.com \
    --to=nicolas.pouillard@gmail.com \
    --cc=H.Tews@cs.ru.nl \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).