Take this example:
{-# OPTIONS_HADDOCK ignore-exports #-}
module HaddockTest (e1) where
-- * Exported
-- | This is exported.
e1 :: Int
e1 = 1
-- * Private
-- | This is not exported.
p1 :: Int
p1 = 1
Strangely, the doc-string for the non-exported declaration is ignored, even though we get the structure otherwise correctly:
Does anyone have a clue? For the record, invoking via cabal haddock --internal
doesn't help, nor does haddock --ignore-all-exports
.
It's a bug in haddock-2.10, reported in March and fixed soon after, but the haddock shipped with GHC-7.4.1 was affected. Presumably the haddock shipped with 7.4.2 includes the fix (haven't built 7.4.2 yet).