Skip to content

Support consecutive named Haddock comments

(I don't sufficiently understand the manner in which this arises from a GHC issue, but reliable sources inform me that it does.)

This haddock issue, https://github.com/haskell/haddock/issues/392, apparently is related to the manner in which GHC parses comments.

The way it manifests is that

module Foo
(
  -- $chunk1
  -- $chunk2
  foo,
  -- $chunk3
  bar
)
where

{- $chunk1
This is chunk 1.
-}

{- $chunk2
This is chunk 2.
-}

{- $chunk3
This is chunk 3.
-}

foo = 3
bar = 7

The resulting haddock documentation will include chunks 1 and 3 but not 2.

See the linked ticket for a discussion by Mateusz Kowalczyk explaining how this relates to GHC.

Trac metadata
Trac field Value
Version 7.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Parser)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information