假设我有一个名为 Haskell 的模块MyModule,它导入一个像这样的外部模块:
import ModuleA hiding (a, b, c)
而且我不能修改这个导入语句,因为这个程序不完全是我的。
我希望ModuleA.external_function在文档ModuleA中的注释中链接到一个名为my_function. 所以代码看起来像这样:
-- | my_function makes use of 'ModuleA.external_function'
my_function :: Int -> Int
使用 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声明。
谢谢你。