[Haskell-cafe] haddock - 'could not find link destination"

Daniel Fischer daniel.is.fischer at web.de
Thu Jan 21 09:06:56 EST 2010

Am Donnerstag 21 Januar 2010 14:51:20 schrieb Andrew U. Frank:
> i try to use haddock for documentation, but have no success. no output
> is produced. i assume i make some stupid mistake (not having used
> haddock before)
> help is appreciated! thank you
> andrew
> -------------------------------
> i get the following error:
> $ haddock Hadtest2.hs
> Warning: Main: could not find link destinations for:
>     GHC.Types.Int GHC.Base.String

That is not an error, haddock just tells you that it doesn't know where the 
docs for base are.

If you want to run haddock by hand, and that it links the docs, you must 
pass a lot of --read-interface=xxx.haddock flags on the command line.
Also, to generate output, you have to tell it which sort of output, AFAIR, 
-h produces HTML, another option is --hoogle.

But I find it easier to let Cabal deal with haddock, make a Cabal package,

runghc ./Setup.hs configure --user --prefix=$HOME
runghc ./Setup.hs haddock --hyperlink-source

More information about the Haskell-Cafe mailing list