[haddock] #95: Haddock comments on constructor arguments

haddock haddock at projects.haskell.org
Sun Mar 1 07:35:30 EST 2009


#95: Haddock comments on constructor arguments
------------------------+---------------------------------------------------
Reporter:  waern        |       Owner:     
    Type:  enhancement  |      Status:  new
Priority:  major        |   Milestone:     
 Version:               |    Keywords:     
------------------------+---------------------------------------------------
 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
 }}}

-- 
Ticket URL: <http://trac.haskell.org/haddock/ticket/95>
haddock <http://www.haskell.org/haddock>
Haddock, The Haskell Documentation Tool


More information about the Haddock mailing list