<div dir="ltr">Haddock offers a way to add anchors to the documentation and to link to them, see <a href="https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810720016">https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810720016</a>. I've got 2 problems with that:<div><br></div><div>   * A link to an anchor "Foo.Bar#Baz" is always rendered with the text "Foo.Bar" in the HTML backend. Is there a way to change that? With the HTML backend I actually want something like:</div><div><br></div><div>        <a href="path-to-Foo.Bar#Baz">My own link text</a></div><div><br></div><div>   * Using relative hype [My own link text](Foo-Bar.html#Baz) instead has problems, too: The "Foo-Bar.html" part is fragile and depends on Haddock flags. Furthermore, when using the LaTeX backend, the resulting LaTeX code is broken (the '#' needs an escaping backslash).</div><div><br></div><div>So is there a non-fragile way working with several backends which makes it possible to specify the link text? Staring at the Haddock docs and the Haddock source code didn't help, and several experiments gave no clue, either. :-/</div></div>