haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 241 forks source link

Support local export links with custom text #802

Open expipiplus1 opened 6 years ago

expipiplus1 commented 6 years ago

It might come in handy to be able to make links to exports with some custom text, for example:

[some link]('Module.Foo')

This would appear as some link and link to the same place that 'Module.Foo' would have.

This steps on the markdown link syntax ever so slightly in case people are using relative links with 's at the beginning and end, but that seems very unlikely.

garetxe commented 5 years ago

Having this would very quite useful for the haskell-gi bindings, for linking to signals and properties properly. For example, if you look to the documentation for widgetChildNotify in gi-gtk the documentation refers to a signal 'Widget::child-notify'.

The proper link does exist in the documentation, as an anchor:

https://hackage.haskell.org/package/gi-gtk-3.0.31/docs/GI-Gtk-Objects-Widget.html#signal:childNotify

but there seems to be no way to refer to this anchor using the Haddock syntax, while at the same time showing the signal name.