pkg检查haddock警告

pkg检查haddock警告

本文介绍了ghc-pkg检查haddock警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新安装的haskell平台上(通过 homebrew )( GHC x64 7.6.3 OSX 10.9.2 运行 ghc-pkg check 时会收到以下警告(见下文)

 警告:haddock-interfaces:/Users/user/.cabal/share/doc/x86_64-osx-ghc-7.6.3/ghc- mod-3.1.7 / html / ghc-mod.haddock不存在或不是文件
警告:haddock-html:/Users/user/.cabal/share/doc/x86_64-osx-ghc -7.6.3 / ghc-mod-3.1.7 / html不存在或不是目录
警告:haddock-interfaces:/Users/user/.cabal/share/doc/x86_64-osx- ghc-7.6.3 / hlint-1.8.59 / html / hlint.haddock不存在或不是文件
警告:haddock-html:/Users/user/.cabal/share/doc/x86_64 -osx-ghc-7.6.3 / hlint-1.8.59 / html不存在或不是目录
警告:haddock-html:/usr/local/Cellar/haskell-platform/2013.2.0.0 /share/doc/mtl-2.1.2/html不存在或不是目录
警告:haddock-interfaces:/ usr / local / Cellar /haskell-platform/2013.2.0.0/share/doc/transformers-0.3.0.0/html/transformers.haddock不存在或不是文件
警告:haddock-html:/ usr / local / Cellar /haskell-platform/2013.2.0.0/share/doc/transformers-0.3.0.0/html不存在或不是目录
警告:haddock-interfaces:/ usr / local / Cellar / haskell-platform /2013.2.0.0/share/doc/case-insensitive-1.0.0.1/html/case-insensitive.haddock不存在或不是文件
警告:haddock-html:/ usr / local / Cellar /haskell-platform/2013.2.0.0/share/doc/case-insensitive-1.0.0.1/html不存在或不是目录

每份文件:

  ghc-pkg检查
检查一致性包裹依赖性和列出破碎的包裹。
接受--simple-output标志。

我尝试运行以下命令来生成haddock文档无济于事:

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

该命令来自用户在haskell邮件列表中的类似问题。



如何安抚 ghc-pkg check 并删除这些警告?



CAVEAT :当我说全新安装时,我的意思是我安装了Haskell-从全新的平台开始安装,并全局安装 cabal-1.18.0.3 并将cabal的bin目录添加到我的路径中。 解决方案

这些haddock警告令人讨厌,但它们不会引起任何问题,AFAIK。我认为警告在1.18版中得到了解决。编辑:好的,所以我们需要遵循kosmikus的建议......

/ p>

  mv〜/ .cabal〜/ .cabal.SAVE 
cabal update

这将创建文件〜/ .cabal / config。如果您愿意,可以编辑此文件。



现在尝试构建一些内容并查看问题是否消失。

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.

解决方案

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.

这篇关于ghc-pkg检查haddock警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 16:14