[wg-camlp4] Structure/signature attributes suggestion

Alain Frisch alain.frisch at lexifi.com
Mon Apr 14 15:57:31 BST 2014


On 10/18/2013 04:13 PM, Alain Frisch wrote:
> I think it makes sense to keep floating attributes in general.  They are
> useful also to turn warnings on/off, for instance.

Leo sent me a gentle reminder about this discussion on "floating 
attributes", i.e. attributes in position of a structure or signature 
item (not attached *to* such an item).  Previously the syntax was the 
same as for item attributes [@@id arg], and floating attributes were 
recognized at the beginning of signatures and structures, and after ";;".

I've introduced a new dedicated syntax:

   [@@@id arg]

for such attributes.  This is much more robust: it was just too easy to 
forget ";;" and have such an attribute attached by mistake to the 
previous item.  And it was quite ugly having to systematically prefix 
such an attribute with ";;".


If anyone strongly objects with this change, speak now!


Damien: if you synchronize your branch with the trunk, you'll have to 
use [@@@warning ....] instead of [@@warning ...].

-- Alain


More information about the wg-camlp4 mailing list