Santiago Cuellar
Santiago Cuellar

Reputation: 405

How to link to a module with different name in Haddock?

I have a module defined as foo.bar and I want to reference it from a different part of the project. However for legibility I want it to show up as bar not foo.bar.

Normally I would just use "foo.bar", but Haddock would show foo.bar. Is there a way to customize the name?

Follow up: What if I want to complexly change the name of the link? Sometimes I want to reference module from a middle of the text. I want to write something like:

-- | There are (other examples)[foo.bar] and ..

to get

There are other examples and ..

where the bolded part is a link to foo.bar

However the best I can do right now is:

-- | There are other examples ("foo.bar") and .. 

which produces

There are other examples (foo.bar) and ..

Which is not always ideal.

Upvotes: 1

Views: 88

Answers (1)

Alexis King
Alexis King

Reputation: 43872

I’m afraid that, at the time of this writing, the answer is “no.”

Upvotes: 2

Related Questions