From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] camlp5 pa_pragma
Date: Tue, 21 Feb 2012 06:00:28 +0100 [thread overview]
Message-ID: <20120221050028.GA12493@yquem.inria.fr> (raw)
In-Reply-To: <1622771061.955142.1329782170309.JavaMail.root@zmbs3.inria.fr>
Hi,
On Tue, Feb 21, 2012 at 12:56:10AM +0100, bob zhang wrote:
> I noticed that camlp5 has a pretty nice extension pa_pragma, would
> you like shed some light on this?
It allows to execute code at syntactic analysis phase and, therefore,
to do syntactic extensions without having to previously compile a file,
containing these extensions.
I am not very satisfied of it, because the evaluation supposes to type
expressions, or to try to type them, what, normally, Camlp* are not
supposed to do. It is complicated, incomplete and perhaps dangerous.
To be correct, it should embark the OCaml toplevel and, therefore, the
whole OCaml compiler, what is not a good idea.
I tried to limit it to evaluation of syntax extensions but it remains
complicated. Probably we should define a precise sub-language for it.
> (I mean the design issue, and the its defect) I would be happy to
> port it to camlp4 if it's not too difficult
I am afraid it is.
--
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/
parent reply other threads:[~2012-02-21 5:00 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1622771061.955142.1329782170309.JavaMail.root@zmbs3.inria.fr>]
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=20120221050028.GA12493@yquem.inria.fr \
--to=daniel.de_rauglaudre@inria.fr \
--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