[wg-camlp4] Structured comments, shallow embeddings and deep quasiquotations

Alain Frisch alain at frisch.fr
Fri Feb 1 07:50:24 GMT 2013

On 1/31/2013 10:13 PM, Gabriel Scherer wrote:
> I like Leo's idea of distinguishing three different forms of syntax
> extensions (I'm not discussing concrete syntax):
> 1. structured comments
> 2. shallow embeddings
> 3. deep embeddings

In which category would you put code generators based on type 
declaration (a la type-conv) also fall in this category?  For me, this 
is one of the most important use case of -ppx (the other being 
instrumentation of code, covered by 1 I guess).  Basically, they only 
require the ability to add annotations on type declaration and type 
expressions (and one needs to be able to include OCaml expressions in 
the annotations).  If/when runtime types are added to OCaml, they will 
hopefully also benefit from those annotations.

I guess that 1 is excluded because those annotations are required to 
compile to program and 3 is excluded, because this has nothing to do 
with syntax.  But 2 does not seem to apply either.

-- Alain

More information about the wg-camlp4 mailing list