Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Geoffrey Mainland <mainland@eecs.harvard.edu>
To: Jon Harrop <jon@ffconsultancy.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] quasiquoting: 3 parsers for camlp4 vs 1 for haskell?
Date: Wed, 22 Apr 2009 22:17:58 -0400	[thread overview]
Message-ID: <20090423021758.GE34560@eecs.harvard.edu> (raw)
In-Reply-To: <200904230019.09216.jon@ffconsultancy.com>

On Thu, Apr 23, 2009 at 12:19:09AM +0100, Jon Harrop wrote:
> On Friday 17 April 2009 19:24:31 Joel Reymont wrote:
> >  From the quasiquoting paper by Geoffrey Mainland [1], page 7:
> >
> > "The major advantage of our approach over that of camlp4
> > is that we demonstrate how to use generic programming
> > to reuse a single parser to parse quasiquoted patterns,
> > quasiquoted expressions and plain syntax that does not
> > include antiquotes. Because OCaml does not support generic
> > programming out of the box,
> 
> I have no idea what he meant by this.
> 
> > in camlp4 this would require three separate parsers,
> 
> AFAICT, that was not true when he wrote it (Sept 2007) and is not true today.
> 
> > each generating different representations of the same concrete syntax."
> 
> That has never been true.
> 
> > Can someone shed light on how, where and why three different
> > parsers are required for camlp4?
> 
> I've CC'd the author. Perhaps he can shed some light on this.

I actually spoke with Nicolas Pouillard about this at the workshop, and
he informed me that his rewrite of camlp4 for the 3.10 release included
a facility for translating a value into an OCaml AST representing that
value, so yes, that statement is now incorrect. I think Jake Donham's
reply to Joel's message of 4/15 made this clear and even helpfully
pointed to some code.

As for my work, I hope that anyone reading the paper will find the
technique I used to provide this functionality in the Haskell
implementation of quasiquotation both elegant and easy to understand.

Geoff


  reply	other threads:[~2009-04-23  2:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-17 18:24 Joel Reymont
2009-04-17 20:06 ` [Caml-list] " Jake Donham
2009-04-22 23:19 ` Jon Harrop
2009-04-23  2:17   ` Geoffrey Mainland [this message]
2009-04-23 14:53   ` 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=20090423021758.GE34560@eecs.harvard.edu \
    --to=mainland@eecs.harvard.edu \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@ffconsultancy.com \
    /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