Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Cabal Sandbox to install correctly linked HTML documentation?

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?

like image 319
Ana Avatar asked Nov 10 '22 15:11

Ana


1 Answers

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.

like image 51
Roman Cheplyaka Avatar answered Nov 15 '22 07:11

Roman Cheplyaka