Suppose I have a Haskell module named MyModule
that imports an external module like this:
import ModuleA hiding (a, b, c)
And I cannot modify this import statement, because the program is not exactly mine.
I wish to link to ModuleA.external_function
in the documentation for ModuleA
, in the comments above a function called my_function
. So the code looks something like this:
-- | my_function makes use of 'ModuleA.external_function'
my_function :: Int -> Int
Using haddock 2.10.0, and running cabal haddock
, the link to ModuleA.external_function
is generated as dist/doc/html/MyModule/ModuleA.html#v:external_function
. However, the problem is that the dist/doc/html/MyModule/ModuleA.html
file does not exist.
How can I generate a link to the docs for ModuleA
instead, like module-A-package/docs/ModuleA.html#v:external_function
. In other words, something similar to what http://hackage.haskell.org/package/text-0.11.2.0/docs/Data-Text.html has for its links to the String
type (they link to http://hackage.haskell.org/package/base-4.5.0.0/docs/Data-String.html#t:String)? Bear in mind that I cannot modify the import
statement.
Thank you.