[Haddock] Question about missing documentation on non-exported symbols

Iustin Pop iusty at k1024.org
Sun Aug 19 20:30:05 BST 2012


Hi all,

Not sure if this is expected or not behaviour - for me it's at least
surprising, if not confusing.

I have this trivial example code:

  {- | A Test module -}

  module Test
    (exported
    ) where
  
  -- | An exported function.
  exported :: Int -> Int
  exported x = process x
  
  -- | A non-exported function.
  process :: Int -> Int
  process x = x + 1
  
Running haddock 2.10 on it (ghc 7.4.1):

$ haddock --ignore-all-exports --html Test.hs
Haddock coverage:
  67% (  2 /  3) in 'Test'
Warning: Test: could not find link destinations for:
    GHC.Types.Int

The coverage is missing a docstring for the process function, even
though it has one; so --ignore-all-exports includes all functions, but
not their documentation.

Any clues? Or is this expected? I tried to look at the open tickets but
nothing was obvious.

thanks,
iustin



More information about the Haddock mailing list