[wg-camlp4] Structure/signature attributes suggestion
Alain Frisch
alain.frisch at lexifi.com
Sat Oct 12 06:59:40 BST 2013
What about using regular item attributes for section headers? This
might be not so nice conceptually, but would there be actual problems
with this approach?
-- Alain
On 10/11/2013 11:19 PM, Leo White wrote:
>> 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