2015-06-28 15 views
3

我試圖用haddock爲一個庫生成文檔,雖然它可以工作,但它不會鏈接GHC /標準庫中的任何類型,並且會發出此錯誤:haddock「找不到鏈接目的地」

現在
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 

我用Google搜索了一圈,發現該解決方案將試圖重新安裝與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。到底是怎麼回事?

+0

你在使用什麼操作系統?如果您使用的是Debian衍生產品,則文檔位於'haskell-platform-doc'中。 –

回答

2

在Debian和Ubuntu上,Haskell平臺文檔在單獨的包中提供(haskell-platform-doc)。您可以使用apt-get安裝:

sudo apt-get install haskell-platform-doc 

我建議安裝剖析庫(haskell-platform-prof)爲好。