This should work, but accept it with a piece of salt, as I am having additional problems due to this known error. Make sure your file .cabalhas the correct dependencies, especially the part if impl(haste) ..( see This ). It looks like most of the dependencies for Haste (and since Haste uses GHC 7.10.3 today) work with lts-6.14, so I used this as resolver.
hurry-project.cabal
name: haste-project
version: 0.1.0.0
category: Web
build-type: Simple
cabal-version: >=1.10
executable haste-project-exe
hs-source-dirs: app
main-is: Main.hs
build-depends: base >= 4.8 && < 4.9
if impl(haste)
build-depends: haste-lib >= 0.5 && < 0.6
else
build-depends: haste-compiler >= 0.5 && < 0.6
default-language: Haskell2010
stack.yaml
extra-deps:
- HTTP-4000.2.23
- ghc-simple-0.3
- haste-compiler-0.5.4.2
- shellmate-0.2.3
resolver: lts-6.14
Then from the same directory you can go to the usual setup instructions for Haste , but with the addition of the Cabal command stack:
$ stack build
$ stack install haste-compiler
$ stack exec haste-boot
Then you can run all the usual commands, but with a prefix stack exec --. for instance
$ stack exec -- hastec -O2 -fglasgow-exts myprog.hs
source
share