Ticket #11 (closed defect: invalid)

Opened 6 years ago

Last modified 22 months ago

Top-level Haddock comments must follow the layout of declarations

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

Description

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 6 years ago by anonymous

  • milestone 2.3.0 deleted

Changed 5 years ago by waern

  • milestone set to 2.6.0

Changed 4 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 22 months ago by anonymous

  • milestone 2.6.0 deleted

Milestone 2.6.0 deleted

Note: See TracTickets for help on using tickets.