我正在尝试为我的包制作文档。当我运行cabal haddock --executable
时,它给出以下输出:
Running Haddock for Geometroid-0.1...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: array-0.4.0.0, base-4.5.0.0,
rts-1.0, deepseq-1.3.0.0, ghc-prim-0.2.0.0, integer-gmp-0.4.0.0,
old-locale-1.0.0.4, random-1.0.1.1, time-1.4
Preprocessing test suite 'test-fighter' for Geometroid-0.1...
Preprocessing executable 'fighter' for Geometroid-0.1...
Haddock coverage:
20% ( 1 / 5) in 'Fighter'
Warning: Fighter: could not find link destinations for:
GHC.Types.Int GHC.Show.Show System.Random.Random GHC.Types.Double GHC.Classes.Eq GHC.Classes.Ord
Documentation created: dist/doc/html/Geometroid/fighter/index.html
在生成的文档中确实没有指向内置类型的链接。
我尝试根据 this answer 生成已安装软件包的所有文档,但这并没有改变任何东西。
我使用的是 Ubuntu 12.04,通过 apt-get
安装了 haskell-platform
。
如何生成包含所有正确链接的完整文档?
最佳答案
如果您使用您的发行版提供的 Haskell 软件包(似乎是这种情况),则文档位于单独的软件包中。对于您的情况,apt-get install haskell-platform-doc
或只是apt-get install ghc-doc
应该有所帮助。
关于haskell - Haddock 找不到已安装软件包的文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18238975/