Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

haddock "could not find link destinations for"

I tried using haddock to generate documentation for a library and while it works, it won't link any types that are part of GHC/the standard libraries and emits this error:

Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: array-0.4.0.1, base-4.6.0.1,
binary-0.5.1.1, rts-1.0, bytestring-0.10.0.2, containers-0.5.0.0,
deepseq-1.3.0.1, ghc-prim-0.3.0.0, integer-gmp-0.5.0.0, utf8-string-1
Haddock coverage:
  93% ( 14 / 15) in 'projectname'
Warning: SHA1: could not find link destinations for:
    GHC.Base.String Data.ByteString.Lazy.Internal.ByteString GHC.Word.Word32 GHC.Integer.Type.Integer GHC.Types.Int Data.Sequence.Seq

Now I googled around and found that the solution would be trying to reinstall those packages with haddock install array-0.4.0.1 base-4.6.0.1 binary-0.5.1.1 rts-1.0 bytestring-0.10.0.2 containers-0.5.0.0 deepseq-1.3.0.1 ghc-prim-0.3.0.0 integer-gmp-0.5.0.0 utf8-string-1 --enable-documentation but it fails with

cabal: Could not resolve dependencies:
rejecting: base-4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0 (global constraint requires
==4.6.0.1)
rejecting: base-4.6.0.1 (only already installed instances can be used)
rejecting: base-4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0,
4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global
constraint requires ==4.6.0.1)

and also doesn't even find a package called rts. What is going on?

like image 490
tolUene Avatar asked Sep 28 '22 11:09

tolUene


1 Answers

On Debian and Ubuntu, the Haskell Platform documentation is provided in a separate package (haskell-platform-doc). You can install it using apt-get:

sudo apt-get install haskell-platform-doc

I recommend installing the profiling libraries (haskell-platform-prof) as well.

like image 173
Lambda Fairy Avatar answered Nov 15 '22 08:11

Lambda Fairy