[Haskell-cafe] Monospace code in Haddock

Niklas Hambüchen mail at nh2.me
Wed Sep 5 22:11:47 CEST 2012

When you write:

-- | This function returns the string @hello@

and you have a function called hello in scope, haddock will hyperlink
the the above hello to that function, which is confusing if your
monospace string has actually nothing to do with that function.

In other words: Haddock always links to your functions in inline
monospaced text, and you can't turn that off.

-- | Gives you @\<span\>hello\</span\>@

will therefore link to functions 'span' and 'hello' if they exist.

On 05/09/12 21:04, Simon Hengel wrote:
> On Wed, Sep 05, 2012 at 08:53:26PM +0100, Niklas Hambüchen wrote:
>> OK, but how to prevent it from linking to foo if I have a function foo
>> in my module?
> Hmm, I'm not sure if I understand the problem.  Can you give a minimal
> example?
> Cheers,
> Simon

More information about the Haskell-Cafe mailing list