[wg-camlp4] [Caml-devel] Structure/signature attributes suggestion

Damien Doligez damien.doligez at inria.fr
Mon Apr 14 16:40:44 BST 2014


IIUC, we now have three kinds of attributes:

[@foo]   attached to an expression
[@@foo]  attached to a structure item
[@@@foo] attached to the whole module (with location being significant?)

I like this change.

BTW I won't have to use [@@@warning] because I don't use [@@warning] yet...

-- Damien



On 2014-04-14, at 16:57, Alain Frisch wrote:

> 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
> 
> _______________________________________________
> Caml-devel mailing list
> Caml-devel at yquem.inria.fr
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-devel



More information about the wg-camlp4 mailing list