Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to instruct haddock to link to hackage documentation for hackage packages?

So, I am using haddock (through cabal) to generate documentation for my local Haskell package. It has no trouble hyperlinking its own local html documents to each other. However, whenever my package references a symbol from another package, it does not create the link.

Most of my outside dependencies have haddock documentation on Hackage. Is there a way to set up haddock such that it can find the documentation of Hackage and hyperlink to it?

like image 632
PyRulez Avatar asked Oct 19 '25 01:10

PyRulez


1 Answers

I usually do,

cabal v2-haddock --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs' --haddock-hyperlink-source --haddock-quickjump

The only problem for me with this approach is that, it may link with latest packages that are not yet available on Hackage. For example, when I run this on ghc-8.8 it links to base-4.13 which hasn't been released on Hackage yet.

like image 69
Pranay Sashank Avatar answered Oct 22 '25 06:10

Pranay Sashank



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!