用于 Cabal 安装模块的 Haddock?
我正在使用 GHC 并通过 Cabal 安装了几个软件包。其中一个软件包的网站上写着“去查看黑线鳕文档”。 haddock
命令似乎仅适用于源文件,而 cabal haddock
似乎仅适用于具有 .cabal
的项目的顶级目录代码>构建文件。有没有办法对模块说“给我看黑线鳕”?
我渴望 pydoc -p 12345 启动一个 HTTP 服务器,根据您本地安装的内容提供 Python 文档。
作为解决方法,我从 ~/.cabal
下提取源 tarball 并运行 cabal configure; cabal haddock
在源目录中,但这有点痛苦。
I'm using GHC and have installed several packages via Cabal. One of the packages' web site says "go see the haddock documentation". The haddock
command seems to only work on source files, and cabal haddock
only seems to work in the top-level directory of a project with a .cabal
build file. Is there a way to say "show me the haddock" for a module?
I'm longing for pydoc -p 12345
which starts an HTTP server providing Python documentation based on what you have installed locally.
As a work-around, I extracted the source tarball from under ~/.cabal
and ran cabal configure; cabal haddock
in the source directory, but that's kind of a pain.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
编辑你的配置文件:
有一个选项可以启用默认安装文档:
要安装现有软件包的文档,请使用:
从基本包重新安装文档,然后再安装上层包,这样就会正确生成到其他模块的“超链接”。
edit your config file:
there is a option to enable default install doc:
to install doc of existing packages, use:
re-install docs from basic packages then the upper-level packages, so the "hyper-link" to other modules will be generated properly.
--haddock
标志对我不起作用。但是,将--haddock
替换为--enable-documentation
可以:现在,如果他们可以允许
--hyperlink-source
标志进行压缩到黑线鳕我会很高兴。The
--haddock
flag didn’t work for me. However, replacing--haddock
with--enable-documentation
did:Now, if they could allow the
--hyperlink-source
flag to zip through to haddock I’d be very happy.这是一个已知问题。作为一种解决方法,您可以使用 这个小型 PHP 脚本。
This is a known issue. As a workaround you can configure your Apache installation (if you have one) to serve your doc directory using this small PHP script.
您应该能够通过以下方式生成本地文档:
假设您安装了 Haddock。
You should be able to generate local documentation with:
Assuming you have Haddock installed.