8

Upon a fresh install of the haskell-platform (via homebrew) (GHC x64 7.6.3) on OSX 10.9.2 I receive the following warnings when I run ghc-pkg check (see below)

Warning: haddock-interfaces: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/ghc-mod-3.1.7/html/ghc-mod.haddock doesn't exist or isn't a file
Warning: haddock-html: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/ghc-mod-3.1.7/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/hlint-1.8.59/html/hlint.haddock doesn't exist or isn't a file
Warning: haddock-html: /Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/hlint-1.8.59/html doesn't exist or isn't a directory
Warning: haddock-html: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/mtl-2.1.2/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/transformers-0.3.0.0/html/transformers.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/transformers-0.3.0.0/html doesn't exist or isn't a directory
Warning: haddock-interfaces: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/case-insensitive-1.0.0.1/html/case-insensitive.haddock doesn't exist or isn't a file
Warning: haddock-html: /usr/local/Cellar/haskell-platform/2013.2.0.0/share/doc/case-insensitive-1.0.0.1/html doesn't exist or isn't a directory

Per the docs:

ghc-pkg check
    Check the consistency of package depenencies and list broken packages.
    Accepts the --simple-output flag.

I attempt to run the following command to generate haddock documentation to no avail:

sudo cabal install --reinstall --force-reinstalls --enable-documentation

The command was from a similar question a user had on the haskell mailing list. http://www.haskell.org/pipermail/glasgow-haskell-users/2012-February/021780.html

How do I appease ghc-pkg check and remove these warnings?

CAVEAT: When I say "fresh install" I mean I have installed the Haskell-platform from scratch, and installed globally cabal-1.18.0.3and added cabal's bin directory to my path.

The Internet
  • 7,959
  • 10
  • 54
  • 89
  • 1
    The warnings complain about `ghc-mod` and `hlint`. Neither are in the Haskell Platform. So if you really did a fresh install of the Haskell Platform, you probably still have old packages in your `~/.cabal` directory from a previous installation. – kosmikus Mar 21 '14 at 09:42
  • There are a *lot* more than just those two, let me paste an update. See above. – The Internet Mar 21 '14 at 15:46
  • I'm having the exact same thing on Ubuntu (12.04.4 LTS), where I have first uninstalled every Haskell-related package, and then installed the haskell-platform package (2012.1.0.0~debian1). No .cabal folder in my home directory. It complains about stm-2.4.2, Cabal-1.18.1.3, and a lot more. – MarnixKlooster ReinstateMonica Mar 24 '14 at 19:52

1 Answers1

5

Those haddock warnings are annoying, but they don't cause any problems, AFAIK. I think the warnings were fixed in Cabal 1.18. I don't see them any more.


EDIT: OK, so we need to follow kosmikus's suggestion...

mv ~/.cabal ~/.cabal.SAVE
cabal update

This will create the file ~/.cabal/config. You can edit this file if you wish.

Now try building something and see if the problem is gone.

APerson
  • 8,140
  • 8
  • 35
  • 49
mhwombat
  • 8,026
  • 28
  • 53