I might be missing something really obvious (or might have developed temporary blindness staring at the Haddock user guide), but I can't seem to find any way to link to a named chunk of documentation in Haddocks
Edit: I'm trying to create an internal hyperlink from one part of the doc to another named chunk of documentation. I've tried the following:
-- You may want to take a look at 'findByPkHelpers' section for
-- variations of this function.
--
-- I even tried putting '$findByPkHelpers' but didn't work
--
-- ... snip ...
-- ** Some heading
--
-- $findByPkHelpers
You can use the syntax #myanchor
to create an anchor, and then you can link to it with [my link text](#myanchor)
. For example, in my export list I have
-- | #launchaprocess#
-- * Launch a process
, runProcess
, readProcess
and then in the body of the file I have a link to this anchor
-- | Once you have a @ProcessConfig@ you can launch a process from it
-- using the functions in the section [Launch a process](#launchaprocess).
(N.B. in the case of anchors next to section headers in export lists there must be a blank link between them otherwise the *
introducing the header will be interpreted as a Haddock-comment bulleted list!)
[Thanks to @sjakobi for pointing out this functionality]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With