From: Martin Jambon <martin.jambon@ens-lyon.org>
To: Hendrik Tews <H.Tews@cs.ru.nl>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] 2 camlp4 questions
Date: Thu, 5 Apr 2007 14:54:28 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0704051448190.11577@localhost> (raw)
In-Reply-To: <17941.26750.232997.697322@tandem.cs.ru.nl>
On Thu, 5 Apr 2007, Hendrik Tews wrote:
> Hi,
>
> I am still reading the camlp4 sources:
>
> 1. Is there a special @loc quotation form? For instance in
> camlp4/Camlp4Bin.ml line 141
>
> [ <:sig_item@loc< # $n$ $str:s$ >> -> Some (loc, n, s)
>
> What does it do? Or is ``sig_item@loc'' just the identifier of
> the quotation expander?
I can answer this one: @x means "bind the location to x". Before you had
to extract the location explicitely using one of the MLast.loc_of_*
functions.
It's not done by default using _loc because of cases like this one:
match e1, e2 with
<:expr< ...>>, <:expr< ... >> -> ...
Martin
--
Martin Jambon
http://martin.jambon.free.fr
next prev parent reply other threads:[~2007-04-05 21:55 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 ` Martin Jambon [this message]
2007-04-06 0:52 ` [Caml-list] " 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=Pine.LNX.4.58.0704051448190.11577@localhost \
--to=martin.jambon@ens-lyon.org \
--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).