caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] camlp5 pa_pragma
       [not found] <1622771061.955142.1329782170309.JavaMail.root@zmbs3.inria.fr>
@ 2012-02-21  5:00 ` Daniel de Rauglaudre
  0 siblings, 0 replies; only message in thread
From: Daniel de Rauglaudre @ 2012-02-21  5:00 UTC (permalink / raw)
  To: Caml List

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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-21  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1622771061.955142.1329782170309.JavaMail.root@zmbs3.inria.fr>
2012-02-21  5:00 ` [Caml-list] camlp5 pa_pragma Daniel de Rauglaudre

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).