From: Hendrik Tews <tews@os.inf.tu-dresden.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Quotations and the functorial camlp4 interface
Date: Fri, 03 Sep 2010 09:17:19 +0200 [thread overview]
Message-ID: <6xmxrzz474.fsf@blau.inf.tu-dresden.de> (raw)
In-Reply-To: <6x7hj86v5f.fsf@blau.inf.tu-dresden.de> (Hendrik Tews's message of "Mon, 30 Aug 2010 16:18:52 +0200")
I wrote:
How about the Loc submodule of Ast that is passed into
OCamlInitSyntax? There is the mutable Loc.name, which contains
the default location variable. If I reuse the Ast argument of
OCamlInitSyntax, will the mutable Loc.name be shared between the
outputs?
Yes, it will, changing Loc.name has a global effect.
What's more problematic is that the Loc sources are not
functorized, that is, there is only one instance
(Camlp4.Struct.Loc) that one can use. Consequently, Loc.name is a
kind of global Camlp4 reference, similar to
Camlp4_config.quotation and Camlp4_config.antiquotations.
Are there syntax extensions in the camlp4 distribution
that mutate Loc.name?
A grep for Loc.name yields only one place that changes Loc.name:
the option -loc in Camlp4Bin.ml. So the answer is probably no.
Bye,
Hendrik
next prev parent reply other threads:[~2010-09-03 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 21:25 Hendrik Tews
2010-08-30 14:18 ` [Caml-list] " Hendrik Tews
2010-09-03 7:17 ` Hendrik Tews [this message]
2010-09-02 8:56 ` Hendrik Tews
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=6xmxrzz474.fsf@blau.inf.tu-dresden.de \
--to=tews@os.inf.tu-dresden.de \
--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).