5

我尝试使用 haddock 为库生成文档,虽然它可以工作,但它不会链接任何属于 GHC/标准库的类型并发出此错误:

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

现在我四处搜索,发现解决方案将尝试重新安装这些软件包,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但它失败了

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)

甚至没有找到一个名为 rts 的包。到底是怎么回事?

4

1 回答 1

4

在 Debian 和 Ubuntu 上,Haskell 平台文档在单独的包 ( haskell-platform-doc) 中提供。您可以使用以下方式安装它apt-get

sudo apt-get install haskell-platform-doc

我建议也安装分析库 ( haskell-platform-prof)。

于 2015-06-29T05:17:34.167 回答