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

Alain Frisch alain.frisch at lexifi.com
Fri Mar 1 08:52:04 GMT 2013


On 03/01/2013 09:08 AM, Mark Shinwell wrote:
> 1. If possible, I'd rather see one new syntactic form, rather than
> three.

Can you elaborate?

The need for various syntaxes arise from:

  - A distinction between attributes (meta-data which can be ignored by 
the type-checker if they remain after -ppx rewriting) and extension 
nodes (on which the type-checker must fail).  Do you claim they should 
be merged, or that we should somehow find a way to use a similar syntax 
for both?

  - The need for attributes/extension nodes on various syntactic 
categories.  For instance, one wants both attributes on type expressions 
and on type declarations, which easily create conflicts in the grammar. 
  Do you think we should restrict where attributes/extension nodes are 
allowed, or that we should find a uniform syntax for 
attributes/extension nodes on all syntactic categories (with priority 
rules)?

  - The desire to have both prefix and postfix syntaxes for attributes. 
This might be overkill, and if I had to choose, I'd pick a postfix 
syntax (but there are probably use cases where prefix attributes would 
look nicer).



Alain


More information about the wg-camlp4 mailing list