PSA: Please use yesod-platform
January 15, 2014
Recently, a large number of the dependencies for Yesod (aeson, fast-logger, warp, attoparsec, etc) have gone through major version bumps. At the same time, a number of other dependencies of Yesod have not relaxed their version bounds for the most recent versions of their dependencies. This situation leads to a lot of confusion for cabal trying to figure out a coherent installation path.
This is precisely the situation for which the yesod-platform situation was designed. If you are having trouble getting Yesod installed, please try running
cabal install yesod-platform instead of
yesod. (In fact, unless you have reason to do otherwise, I highly recommend always doing this.) If you have an existing project with its own set of dependencies, go into that directory and run
cabal install . yesod-platform, which will attempt to choose a version of
yesod-platform with dependencies that fit your constraints. If you use some kind of sandboxing, modify the above commands as necessary.
And let me take this opportunity to mention: if you're trying to build your code on a stable platform, you should make sure that you pin down the versions of all of your dependencies. Greg Weber wrote a great blog post explaining a technique that should fit into most people's standard build processes. Using the Stackage pinned version set will also guarantee builds that are coherent. And of course, building on FP Haskell Center guarantees stable and tested versions of packages which will be maintained.
UPDATE There are two important command line options I should have mentioned. If you're running into dependency hell, try appending the following: