[wg-camlp4] A new branch to experiment with extension points

Alain Frisch alain.frisch at lexifi.com
Wed Mar 6 16:31:48 GMT 2013

On 03/06/2013 04:51 PM, Alain Frisch wrote:
> We could use any "universal" type instead of expressions (strings,
> s-expressions, xml, json).  Some arguments to use OCaml expressions:

I forgot one important argument: using expressions as arguments of 
attributes make it possible, if desired, to have rewriters applied on 
those arguments as well.  For instance, if the first -ppx rewriters to 
be applied are a "macro expander" and a "conditional compilation" 
system, they could operate naturally on the content of attributes 
understood by later rewriters.  This could be useful, for instance, to 
decide to include or not some fragments in the generated documentation 
(generated by a variant of ocamldoc based on attributes) based on 
whether some symbols are defined or not (to create a "public" 
documentation vs. a "private" one, for the same module).

-- Alain

More information about the wg-camlp4 mailing list