views:

192

answers:

3

The command cabal haddock has very useful --hyperlink-source option. I would like to have the source hyperlinked when building documentation with cabal install.

The ticket #517 seems to be just about it: http://hackage.haskell.org/trac/hackage/ticket/517

However, perhaps it is possible to set this flag via ~/.cabal/config file?

If not, how can I get working cabal-install build with the patch from #517 without installing Cabal-1.9, which is currently mandatory (due to one patch from December)?

A: 

What is the problem with installing Cabal-0.9?

SamB
I meant Cabal-1.9 (I have corrected the version number in question). The main problem is that is hasn't been released yet.
Tener
+1  A: 

Ticket #517 is about passing haddock options via cabal, like if you have special needs like building a hoogle database or usa a different CSS

Most users will be happy with standard haddock and hyperlinked sources though, which is possible with Cabal-1.8. Ticket #517 is if you have bigger needs.

Simply calling cabal haddock --hyperlink-source should do the trick.

If you want this as the default, you can edit ~/.cabal/config as you mentioned.

L. Kolmodin
Does that default get used when Haddock doc gets built as part of an invocation of "cabal install some-package"? I think that is what the OP is after - and what doesn't seem to work.
MtnViewMark
I don't want to ever call 'cabal haddock' myself. I want to be able to build and install programs with 'cabal install' and have source hyperlinked in the process.
Tener
Oh, I see. I'm unaware of such a solution.
L. Kolmodin
+1  A: 

Currently you cannot get the equivalent of the --hyperlink-source option when using the "all in one" cabal install command. The ticket you cite is exactly about this issue.

Duncan Coutts