haskell / haddock

Haskell Documentation Tool

Home Page:www.haskell.org/haddock/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OPTIONS_HADDOCK does not recognizes ignore-link-symbol

guibou opened this issue · comments

The following code:

{-# OPTIONS_HADDOCK --ignore-link-symbol GHC.Types.Int #-}
module H where

type A = Int

Triggers a missing link warning:

$ haddock H.hs
Haddock coverage:
Warning: Package name is not available.
Unrecognised option: --ignore-link-symbol
Unrecognised option: GHC.Types.Int
   0% (  0 /  2) in 'H'
  Missing documentation for:
    Module header
    A (H.hs:4)
Warning: H: could not find link destinations for:

	- GHC.Types.Int

Which can be ignored by passing --ignore-link-symbol on the command line:

$ haddock H.hs --ignore-link-symbol GHC.Types.Int
Haddock coverage:
Warning: Package name is not available.
Unrecognised option: --ignore-link-symbol
Unrecognised option: GHC.Types.Int
   0% (  0 /  2) in 'H'
  Missing documentation for:
    Module header
    A (H.hs:4)

However, as you can see, it is not possible to pass this flag in OPTIONS_HADDOCK.

Is there even a way to pass it in a .cabal file? If not, it's quite useless to me.

That's more a limitation of cabal than haddock from my point of view. See: haskell/cabal#7419 for workaround / discussion.

Oh, I meant as an alternative. A pragma is just fine.

Duplicate of #1390?!