5

I created a cabal library inside a sandbox with the following commands:

cabal sandbox init
cabal init

I added the line documentation: True to cabal.config to make sure that documentation is generated, and I added a dependency to the vector package in mylib.cabal. Then I ran:

cabal install --only-dependencies

I got the following output:

/scm/hs-proj/.cabal-sandbox
Configuring primitive-0.6...
Building primitive-0.6...
Installed primitive-0.6
Configuring vector-0.10.12.3...
Building vector-0.10.12.3...
Installed vector-0.10.12.3
Updating documentation index
/scm/hs-proj/.cabal-sandbox/share/doc/x86_64-osx-ghc-7.10.1/index.html

So far so good.

When I opened the index file it contained links to a lot of packages, like:

file:///scm/hs-proj/.cabal-sandbox/share/doc/x86_64-osx-ghc-7.10.1/Data-List.html
file:///scm/hs-proj/.cabal-sandbox/share/doc/x86_64-osx-ghc-7.10.1/Data-Vector.html

But of these links pointed to any real files. Note that this is the case for the extra dependencies like vector and also for built-in packages list Data.List.

So I think I've installed the documentation incorrectly. Can someone point out how I've installed the documentation incorrectly and how to do it correctly?

  • I'm not completely sure but I think if you change the flag in your `~/.cabal/config` file for Documentation to True and uncomment it, clean the sandbox and reinstall it should work. – DiegoNolan Apr 25 '15 at 08:02

1 Answers1

1

It's not your fault, this is a known bug in haddock. It only affects ghc 7.10, so a workaround could be to use ghc 7.8.4 until this is fixed.

Roman Cheplyaka
  • 37,738
  • 7
  • 72
  • 121