[wg-camlp4] My uses of syntax extension

Hongbo Zhang hongboz at seas.upenn.edu
Mon Jan 28 15:54:58 GMT 2013


This paper may help you understand how quasi-quotation is implemented
http://ipaper.googlecode.com/git-history/969fbd798753dc0b10ea9efe5af7773ff10f728a/Miscs/why-its-nice-to-be-quoted.pdf
The problem is unlike Haskell, we don't have a nice generic
programming ability in ocaml(The Scrap your bolierpolate approach in
Haskell)

On Mon, Jan 28, 2013 at 10:50 AM, Hongbo Zhang <hongboz at seas.upenn.edu> wrote:
> On Mon, Jan 28, 2013 at 10:43 AM, Leo White <lpw25 at cam.ac.uk> wrote:
>
>> I don't think that it is necessery for how I think we should implement
>> anti-quotations.
>>
>> If you consider some quotation with an anti-quotation like:
>>
>> let body x = <:html < <body attr=$x$> Hello, World <\body> >>
>>
> The html example is trivial to implement in ppx, I agree.
>
> Here is not the parser problem, it's the staging  problem when you
> generalize it to the quotation "str_item" or "expr". Using the
> built-in parser does not help here.
>
>
>
> --
> -- Regards, Hongbo



-- 
-- Regards, Hongbo


More information about the wg-camlp4 mailing list