When creating a Haskell project using Haste, it’s not all that uncommon to want that project – or at least parts of it – to be buildable with vanilla GHC as well. Considering that Haste.App, which is shipped with the standard Haste distribution, more or less requires this functionality to work at all, this is quite a reasonable requirement.
Since Cabal (or stack if you want to be all cool and up to date and stuff) is the build system for Haskell projects, you probably have a .cabal
file for your project:
name: myapp
version: 0.1.0.0
author: Jane Doe
maintainer: janedoe@example.com
build-type: Simple
cabal-version: >=1.10
executable myapp
main-is: Main.hs
build-depends:
base >= 4.8 && < 4.9,
haste-lib >= 0.5 && < 0.6
default-language: Haskell2010
Your application builds just fine when using haste-cabal
, but when you try to build it using vanilla cabal
, you get the following message:
Resolving dependencies...
Configuring myapp-0.1.0.0...
cabal: At least the following dependencies are missing:
haste-lib ==0.5.*
That’s not good! What really went wrong here, and how can we fix it?
Read more...