Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can links to anchors in haddock be labeled?

When linking to a URL, one can provide a label that specifies what the reader will see; for example, <http://www.haskell.org haskell> will have "haskell" for the link text. Unfortunately the documentation does not provide an obvious way to label links to anchors; the link "Data.FooBar#foo" will have "Data.FooBar" for the link text so that it is not obvious to the reader that this link is going to an anchor.

So my question is: is there a trick to label links to anchors in haddock, or is this impossible?

like image 783
Gregory Crosswhite Avatar asked Sep 13 '13 14:09

Gregory Crosswhite


People also ask

What is the link text used for in Haddock?

The link text is used as a descriptive text for the URL, if the output format supports it. Haddock supports Markdown syntax for inline images. This resembles the syntax for links, but starts with an exclamation mark.

Is Haddock markup valid in this comment?

All the usual Haddock Markup is valid in this comment. Haddock produces interface documentation that lists only the entities actually exported by the module. If there is no export list then all entities defined by the module are exported.

What are the annotations in Haddock?

The annotations are purely optional: if there are no annotations, Haddock will just generate documentation that contains the type signatures, data type declarations, and class declarations exported by each of the modules being processed.

Is it possible to write documentation after declaration in Haddock?

Some people like to write their documentation after the declaration; this is possible in Haddock too: Since Haddock uses the GHC API internally, it can infer types for top-level functions without type signatures.


1 Answers

This is now https://github.com/haskell/haddock/issues/262 (submitted by OP).

As I write this, it is open and has not been commented on.

like image 97
SamB Avatar answered Oct 25 '22 18:10

SamB