开发者

Cabal: Odd Error Message + Lack of Documentation

开发者_Python百科So I recently installed cabal (from the default binary of ArchLinux). I then tried to upgrade cabal as a user:

cabal upgrade Cabal --user --prefix=$USER

Resolving dependencies...

cabal: fromFlag NoFlag. Use fromFlagOrDefault

What I've already done:

  1. Googled the error message. Turned up the cabal source and little else.
  2. Looked at haskell-wiki on cabal-install.
  3. Looked through this guide.

So basically I'm wondering:

  • What's up with the error message?
  • Could anyone point me in the direction of a cabal tutorial?


I think that's a bug in Arch's package. I'm running Arch as well, and I got the same error.

I then built cabal-install (0.8.2) from Hackage, which didn't complain when I run cabal upgrade Cabal. In fact, it started building right away, although I didn't let it finish because I didn't feel comfortable upgrading a core package.

May I ask why you wanted to upgrade Cabal? The version that comes with ghc is 1.8.0.2, and the latest version is 1.8.0.4 -- not too distant IMO. Besides, if you're running cabal-install as normal user, why not simply cabal install? It doesn't have permission to overwrite the system files anyway.


I'm guessing wildly here, but can you see if

  • You have a nonstandard Setup.hs?
  • You have flags: set in ~/.cabal/config?

The most helpful tutorial I have found is not ostensibly about Cabal; it is called How to Write a Haskell Program.

I have looked through the guide you mention (the official Cabal documentation), and the information I wanted is a tiny bit of flotsam swimming in a sea of complexity. I assume that the complexity serves some useful purpose, since I know that good people have been working very hard on Cabal for several years, but as an outsider, I find the state of play discouraging. I was just barely able to build, install, and upload a simple package of my own—with a little help from my friends on SO.

I tentatively suggest you might want to avoid cabal upgrade and maybe try cabal install instead, and see if you can move forward with your original goals.


From user tlo:

The global configuration file for cabal-install is ~/.cabal/config. If you do not have this file, cabal will create it for you on the first call to cabal update.

I deleted my config, ran cabal update, and all was good.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜