1

I tried to set up a yesod project as follows:

mkdir sample_blog
curl -o cabal.config www.stackage.org/nightly/cabal.config
cabal install alex happy yesod-bin

However, I got the following error:

Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: Cabal (user goal)
rejecting: Cabal-1.18.1.4/installed-d6c... (global constraint requires
==1.18.1.3)
trying: Cabal-1.18.1.3/installed-476...
trying: yesod-bin-1.4.2 (user goal)
next goal: ghc (dependency of yesod-bin-1.4.2)
rejecting: ghc-7.8.3/installed-1d5... (conflict:
Cabal==1.18.1.3/installed-476..., ghc => Cabal==1.18.1.4/installed-d6c...)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

I've install GHC and cabal-install using homebrew. Versions:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.3


$ cabal --version
cabal-install version 1.20.0.4
using version 1.20.0.3 of the Cabal library
11Kilobytes
  • 451
  • 1
  • 6
  • 15

1 Answers1

2

It appears that homebrew has patched the standard GHC installation, as it's shipping with a different version of the Cabal library than the official GHC. I don't know why that is occurring. A quick workaround would be to remove the Cabal line from your cabal.config. Can you open up an issue against Stackage about this? I'd like to get to the bottom of why this is occurring.

Michael Snoyman
  • 31,100
  • 3
  • 48
  • 77
  • To confirm, you want an issue against stockage, and not homebrew. – 11Kilobytes Dec 20 '14 at 16:31
  • Yes, that issue was good, thanks. It would be nice to have someone from homebrew explain why they have a different version in use. Now that I think about it, it's theoretically possible that *all* Mac users have a different version of the Cabal library. – Michael Snoyman Dec 20 '14 at 16:58
  • By the way, when I have installed yesod-bin into my sandbox, what do I do now. If I create a new project using ./cabal-sandbox/bin/yesod init, I get a new subdirectory without a cabal-sandbox in it. So, how do I create a new project in the current directory? – 11Kilobytes Dec 20 '14 at 17:20
  • `yesod init --bare`. We *just* updated the quickstart guide for this use case: http://www.yesodweb.com/page/quickstart. – Michael Snoyman Dec 20 '14 at 17:33