ghc-pkg check haddock warnings

北慕城南 提交于 2019-12-22 04:58:12

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/22554498/ghc-pkg-check-haddock-warnings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!