问题标签 [haddock]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
haskell - Is it possible to hide specific functions from appearing in the documentation using haddock?
I use haddock and don't want all of my exported functions to be displayed in the documentation. Is it possible to hide specific functions? I found the prune attribute at http://www.haskell.org/haddock/doc/html/module-attributes.html, but this is not what I want since some functions which shall be exported don't have a documentation annotation.
haskell - Haddock:用默认类文档替换怪癖的实例函数的文档
考虑以下示例:
当通过 haddock 运行时,这些函数get
会put
显示出来,但它们使用的是 MonadState 的默认文档。如何在我的模块中包含我自己的文档?
(你可以在这里cabal haddock
运行repo来了解我的意思)
haskell - Haddock link to functions in non-imported modules
In module B
I have documentation with a link 'A.foo'
, linking to the foo
member of module A
. In module A
I import module B
. Haddock renders this as a link to A.html#t:foo
, namely pointing at the type foo
(which does not exist) not the function foo
, which is at A.html#v:foo
.
- Why does Haddock link to
t:
for variables that start with a lower case letter? Is that a bug? For'A.Foo'
I can see that it could be a type or a constructor, so there are namespacing issues. Forfoo
it seems a variable is at least most plausible. - Is there any way to fake a link? I am writing this in code samples, so I need it to be rendered as
foo
. I tried anchors, but they render as the module name, and for direct hyperlinks you have no control over the displayed text. - I considered a post processor (replacing
t:[a-z]
withv:
), but that requires a custom Setup.hs which causes problems and is quite ugly. - I couldn't find any Haddock command line flags to obtain a more reasonable behavior, such as specifying that
foo
is a variable. - I can't add an import of
A
toB
without introducing circular imports, which is vile to add purely for documentation.
I am running into this problem in the Shake documentation, where as an example removeFilesAfter
does not get the right link.
haskell - Haddock 找不到已安装软件包的文档
我正在尝试为我的包裹制作文档。当我运行cabal haddock --executable
它时,它会给出以下输出:
在生成的文档中确实没有指向内置类型的链接。
我尝试根据这个答案为已安装的软件包生成所有文档,但它没有改变任何东西。
我正在使用 Ubuntu 12.04 并haskell-platform
通过apt-get
.
如何生成包含所有正确链接的完整文档?
haskell - 可以标记黑线鳕中锚点的链接吗?
当链接到一个 URL 时,可以提供一个标签来指定读者将看到什么;例如,<http://www.haskell.org haskell>
链接文本将具有“haskell”。不幸的是,该文档没有提供一种明显的方式来标记指向锚点的链接;链接“Data.FooBar#foo”的链接文本将包含“Data.FooBar”,因此读者看不到此链接将指向锚点。
所以我的问题是:在黑线鳕中标记指向锚点的链接是否有技巧,或者这是不可能的?
haskell - Haddock - 链接到外部模块中的功能(导入整个模块)
假设我有一个名为 Haskell 的模块MyModule
,它导入一个像这样的外部模块:
而且我不能修改这个导入语句,因为这个程序不完全是我的。
我希望ModuleA.external_function
在文档ModuleA
中的注释中链接到一个名为my_function
. 所以代码看起来像这样:
使用 haddock 2.10.0 并运行cabal haddock
,生成的链接ModuleA.external_function
为dist/doc/html/MyModule/ModuleA.html#v:external_function
. 但是,问题是该dist/doc/html/MyModule/ModuleA.html
文件不存在。
我如何生成指向文档的链接ModuleA
,例如module-A-package/docs/ModuleA.html#v:external_function
. 换句话说,类似于http://hackage.haskell.org/package/text-0.11.2.0/docs/Data-Text.html的String
类型链接(它们链接到http://hackage.html)。 haskell.org/package/base-4.5.0.0/docs/Data-String.html#t:String)?请记住,我无法修改该import
声明。
谢谢你。
haskell - 是否有任何工具/网站可以让我阅读带有 Haddock 渲染的 Haskell 源代码?
我想阅读一个库的源代码(示例),但 Haddock 注释呈现得非常漂亮(示例)。http://www.haskell.org/ghc/docs有这两种观点,但没有将它们结合在一起。
有没有人制作了一个用户界面来一起查看这些?它基本上是渲染视图,但每个函数/类/任何内容的源代码直接插入每个渲染的文档项下方。
haskell - 如何将黑线鳕与 c2hs 一起使用?
我正在使用 c2hs 编写一些 haskell 绑定,并且我想使用 Haddock 来记录自动生成的构造函数和函数参数。但是,c2hs 忽略了注释;
如何在不编写太多 FFI 代码的情况下获得这些字段的 Haddock 文档?
haskell - ghc-pkg 检查黑线鳕警告
全新安装haskell-platform(通过homebrew
)(GHC x64 7.6.3
)OSX 10.9.2
时,我在运行时收到以下警告ghc-pkg check
(见下文)
根据文档:
我尝试运行以下命令来生成黑线鳕文档无济于事:
该命令来自用户在 haskell 邮件列表中的一个类似问题。 http://www.haskell.org/pipermail/glasgow-haskell-users/2012-February/021780.html
如何安抚ghc-pkg check
和消除这些警告?
警告:当我说“全新安装”时,我的意思是我已经从头开始安装 Haskell 平台,并在全局范围内安装cabal-1.18.0.3
并将 cabal 的 bin 目录添加到我的路径中。
haskell - cabal: dist/doc/html/creatur/haddock-prolog27972.txt: invalid argument
When I run cabal haddock
on my package, I don't get any errors. But I've uploaded the package to Hackage, and the build log includes this message:
I assume this is why the modules section in the documentation on Hackage isn't hyperlinked. The full build log is here. I guess the "prolog" it's referring to is the cabal file, but I can't see anything wrong with the syntax (below). Any ideas?