Skip to content

Loading…

cabal haddock should --hyperlink-source by default #527

Closed
bos opened this Issue · 8 comments

3 participants

@bos
Haskell member

(Imported from Trac #534, reported by adamvo on 2009-03-28)

The results from
cabal haddock --hyperlink-source
are very nice, but quite frequently the haddocks are not built with this (all recent hackage libs iirc).

Would there be a problem with generating the source links by default if and only if a HsColour? can be found?

Or should this issue instead be resolved at the haddock level?

@bos
Haskell member

(Imported comment by @dcoutts on 2009-03-28)

The hackage libs do all have the sources. You're thinking of the docs that were built with ghc 6.10.1. That mistake has been corrected.

My personal opinion is that nothing need changing. I'll leave the ticket open to give others a chance to comment.

@bos
Haskell member

(Imported comment by coeus on 2009-03-28)

I like the hyperlinked sources, too. For this, I abuse
cabal-install in bash scripts to download packages and their dependencies from hackage, because the following is still not possible:

cabal install --hyperlink-source packagename

I always have to unpack, configure, build, and "haddock --hyperlink-source" each package, just to have the sources hyperlinked. I don't know any other solution to this.

Imho, it would be nice to have an option for that default behaviour in the config file. "documentation: True" is just not enough.

@bos
Haskell member

(Imported comment by @dcoutts on 2009-03-31)

Replying to coeus:

Imho, it would be nice to have an option for that default behaviour in the config file. "documentation: True" is just not enough.

Indeed. The implementation is unlikely to be difficult. All we are waiting for is for someone to come up with a coherent design. The existing ticket is: #517.

Making the default be --hyperlink-source is just a cop-out for not properly addressing the above ticket.

@bos
Haskell member

(Imported comment by darrint on 2009-04-01)

I agree with the sentiment that making --hyperlink-source a default is the wrong thing to do.

I burned at least a half hour last night looking for a cabal config option similar to "documentation: True," perhaps "hyperlink-source: true." I was surprised to learn that this isn't possible.

So I had to just do without.

I'm working with yesod, ghc 7.4.1 and virthualenv. So my normal workflow is:

  1. download ghc 7.4.1 binaries
  2. bunzip
  3. run virthualenv --ghc=ghc-tarball
  4. Edit cabal config to add "documentation: true." Here is where I wish I could add hyperlink-source.
  5. cabal install yesod # wait a long time
  6. scaffold site.
  7. cabal install --only-dependencies # wait a long time again
  8. realize I forgot cabal install alex.
  9. cabal install alex
  10. cabal install --only-dependencies # wait a long time yet again.
  11. Use web browser to go see my 40 or 50 new packages with haddock docs.
  12. Wish I knew how to make a root index page.
  13. Wish those docs had source linked like I see on Hackage.

Because yesod has soooo many dependencies, it isn't practical to run cabal haddock --hyperlink-source for each one, or at least I haven't found a practical way to do the whole lot in one run.

@bos
Haskell member

(Imported comment by darrint on 2012-02-14)

Sorry for the bad formatting.

@bos
Haskell member

(Imported comment by bfr on 2012-02-14)

I have created a new feature request for adding a configuration item for this, see #941.

@23Skidoo 23Skidoo was assigned
@cartazio
Haskell member

BUMMP
is there a way i can have
--haddock-hyperlink-source by default in my cabal/config file?

@23Skidoo
Haskell member

This was fixed by #1707.

@23Skidoo 23Skidoo closed this
@23Skidoo 23Skidoo removed this from the _|_ milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.