[wg-camlp4] Structure/signature attributes suggestion

Leo White lpw25 at cam.ac.uk
Fri Oct 11 22:19:54 BST 2013


> Are you asking for allowing:
>
>  type t = ...
>
>  [@@@doc.section ....]
>
>  and s = ...
>
>
> ?

Yes

> Honestly, I'm not yet convinced this is really necessary.  Do we really need to split documentation sections in such
> places?  

I think that large files of recursive type definitions, as are quite
common in OCaml, are quite likely to want section headers. I am also
hoping to be backwards-compatible with existing OCamldoc, which I think
supports such comments.

> 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).

I think that will be more work than making type_declaration a variant
type with a Ptyp_attribute constructor. However it may be a little
neater.

Regards,

Leo


More information about the wg-camlp4 mailing list