Ticket #95 (new enhancement)

Opened 5 years ago

Last modified 17 months ago

Haddock comments on constructor arguments

Reported by: waern Owned by:
Priority: minor Milestone:
Version: Keywords:
Cc: mmitar@…, pho@…, f@…

Description

We could try to support Haddock comments on individual constructor arguments:

data A = A Int   -- ^ Documentation for the Int argument
           Float -- ^ Documentation for the Float argument
       | B

But I'm not sure how, since we already support commenting constructors on the same line:

data T a b
  = C1 a b  -- ^ This is the documentation for the 'C1' constructor
  | C2 a b  -- ^ This is the documentation for the 'C2' constructor

Perhaps we could require a parenthesis around the last argument?

data A = A Int   -- ^ Documentation for the Int argument
           (Float -- ^ Documentation for the Float argument)
       | B

Or around both arguments, for consistency:

data A = A (Int   -- ^ Documentation for the Int argument)
           (Float -- ^ Documentation for the Float argument)
       | B

Change History

Changed 4 years ago by mitar

  • cc mmitar@… added

Changed 3 years ago by waern

  • priority changed from major to minor

Changed 3 years ago by PHO

  • cc pho@… added

Changed 17 months ago by bitonic

  • cc f@… added
Note: See TracTickets for help on using tickets.