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@inria.fr
Subject: Re: [Caml-list] 2 camlp4 questions
Date: Fri, 6 Apr 2007 02:52:08 +0200	[thread overview]
Message-ID: <cd67f63a0704051752p28c802e2qf106230adfb6d859@mail.gmail.com> (raw)
In-Reply-To: <17941.26750.232997.697322@tandem.cs.ru.nl>

On 4/5/07, Hendrik Tews <H.Tews@cs.ru.nl> wrote:
> Hi,
>
> I am still reading the camlp4 sources:
>

[... an already answered question ...]

> 2. Camlp4Bin calls a cleaning pass before printing. The cleaner
>    does things like
>
>       <:expr< $e$; $ <:expr<>> $ >> -> self#expr e
>
>    What do these empty quotations ``<:expr<>>'' stand for? Are
>    these just the things that filters leave behind if they delete
>    a node?

Yes it can be some filters junks, but not only.
If you construct something like a sequence, a tuple, a sum type
(everything that was a list before), you will often want to use some
folding style and then these nil quotations will be helpful as initial
values.

At some other points these nil quotations are not useless (and so not
removed by that cleaner phase). For instance, if there is no guard in
a match that's represented by an nil expression:

<:match_case< $p$ -> $e$ >> = <:match_case< $p$ $when:<:expr<>>$ -> $e$ >>

Cheers,

-- 
Nicolas Pouillard


      parent reply	other threads:[~2007-04-06  0:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-05 21:22 Hendrik Tews
2007-04-05 21:54 ` [Caml-list] " Martin Jambon
2007-04-06  0:52 ` Nicolas Pouillard [this message]

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=cd67f63a0704051752p28c802e2qf106230adfb6d859@mail.gmail.com \
    --to=nicolas.pouillard@gmail.com \
    --cc=H.Tews@cs.ru.nl \
    --cc=caml-list@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).