Ticket #11 (closed defect: invalid)

Opened 9 years ago

Last modified 5 years ago

Top-level Haddock comments must follow the layout of declarations

Reported by: waern Owned by:
Priority: major Milestone:
Version: 2.1.0 Keywords:


If layout is used, a Haddock comment must be at the same indentation level as the declaration it is commenting. As an example, the following causes a parse error:

  -- | doc comment for f
f :: Int
f = 1

This needs to be fixed in the GHC lexer, hence the 2.3.0 milestone.

Change History

Changed 9 years ago by anonymous

  • milestone 2.3.0 deleted

Changed 8 years ago by waern

  • milestone set to 2.6.0

Changed 7 years ago by waern

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

This is by design and Haddock 0.9 works the same way. A closing bracket is inserted between the comment and the type signature declaration, because Haddock comments are handled as normal lexemes during layout processing.

Changed 5 years ago by anonymous

  • milestone 2.6.0 deleted

Milestone 2.6.0 deleted

Note: See TracTickets for help on using tickets.