简体   繁体   中英

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.

恐怕在撰写本文时,答案是否定的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM