Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does cabal haddock --hyperlink-source not generate the source HTMLs?

For a cabal project, I wanted to generate haddock documentation with hyperlinks to the source code, so I did the usual:

cabal haddock --hyperlink-source

The links were generated, but upon clicking the links I find that the actual source code is not included even though the links are. The source code is supposed to be rendered via HTML. How do I generate those as well?


Currently using:

  • Cabal 1.22.4.0
  • cabal-install 1.22.6.0
  • haddock 2.16.1
like image 940
Rufflewind Avatar asked Mar 14 '23 05:03

Rufflewind


1 Answers

Turns out it was because hscolour was not installed. Installing it via:

cabal install hscolour

fixed the problem.

Interestingly, there was a warning for it that said

Warning: The program 'hscolour' version >=1.8 is required but it could not be found.

but it was buried inside the usual haddock output so I didn't notice it until now.

like image 82
Rufflewind Avatar answered Apr 06 '23 12:04

Rufflewind