base中有一些模块没有文档链接的黑线鳕。例如,GHC/Show.hs有黑线鳕评论,但 Hackage 上没有关于 GHC.Show
模块的文档。为什么不?这是错误吗?
最佳答案
这显然是故意的。它是 this line 的结果在 GHC/Show.hs 中:
{-# OPTIONS_HADDOCK hide #-}
相关摘录自the haddock documentation :
Certain attributes may be specified for each module which affects the way that Haddock generates documentation for that module. Attributes are specified in a comma-separated list in an
{-# OPTIONS_HADDOCK ... #-}
pragma at the top of the module, either before or after the module description.[...]
The following attributes are currently understood by Haddock:
- hide
Omit this module from the generated documentation, but nevertheless propagate definitions and documentation from within this module to modules that re-export those definitions.
[...]
关于haskell - 为什么 haddock 不为 base 中的某些模块生成 HTML?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44415396/