Ticket #128 (closed defect: fixed)

Opened 5 years ago

Last modified 2 years ago

The documentation of function arguments is not rendered correctly

Reported by: basvandijk Owned by:
Priority: major Milestone:
Version: 2.4.2 Keywords:
Cc:

Description

If I add haddock documentation to the arguments of a function they are not rendered correctly. For example:

foo :: a -- ^ the @a@ argument
    -> b -- ^ the @b@ argument
    -> c -- ^ the @c@ argument
    -> d

is rendered wrongfully as:

foo
:: 	
=> a	the b argument
-> b	the c argument
-> c	
-> d	

(Note that I'm using haddock-2.6 but I can't select that version for this ticket)

Change History

Changed 5 years ago by basvandijk

I just discovered that when you explicitly quantify the type variables in the type the documentation is rendered correctly. For example:

foo :: forall a b c d
    .  a -- ^ the @a@ argument
    -> b -- ^ the @b@ argument
    -> c -- ^ the @c@ argument
    -> d

is rendered correctly as:

foo
:: forall a b c d . 	
=> a	the a argument
-> b	the b argument
-> c	the c argument
-> d

Changed 5 years ago by waern

  • status changed from new to closed
  • resolution set to fixed

We recently fixed this. Thanks for the report though - I updated the test case to cover your example.

Changed 2 years ago by anonymous

  • milestone 2.5.0 deleted

Milestone 2.5.0 deleted

Note: See TracTickets for help on using tickets.