[wg-camlp4] Structure/signature attributes suggestion

Alain Frisch alain.frisch at lexifi.com
Fri Oct 11 21:51:13 BST 2013


Hi Leo,

On 10/11/2013 6:39 PM, Leo White wrote:
> Since this follows the existing pattern of [@...] and [@@...], it should
> not be too much trouble to tell users about [@@@ ...], and certainly no
> worse than explaining ";;[@@...]" to them.

I was also reluctant to introduce a different syntax for those 
"floating" attributes, but you convinced me it's probably the best thing 
to do.

Beside this syntactic question, you're also interested in supporting 
those attributes in more places.  Within class signatures and 
structures, I don't see any problem, but I'm more concerned by floating 
attributes between declarations in a group.  Are you asking for allowing:

  type t = ...

  [@@@doc.section ....]

  and s = ...


?

Honestly, I'm not yet convinced this is really necessary.  Do we really 
need to split documentation sections in such places?  But if we go this 
way, I'd be inclined to look again at an early proposal of considering 
groups of declarations as successive items (similarly to Types), so that 
attached item attributes can be represented more uniformly (in the 
signature_item and structure_item records).


Alain


More information about the wg-camlp4 mailing list