What's it for? I know the Functor class is for computations with a context, and Contravariant is similar in the type signature. Is it possible to use Contravariant with Applicative and Monad?submitted by danmwilson
[link] [14 comments]
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: --max-backjumps=-1 --reorder-goals.
Based on Lennart's code, I implemented ADT and GADT versions of simply-typed lambda calculus with de Bruijn indices, integer constants, and addition, plus the conversion between them, without the distraction of compiling to LLVM. The code was cleaned and improved by Shayan Najd, and made publicly available via github. Thanks to Josef Svenningson for the pointer to Lennart's post.