[Haskell-beginners] Trying to install "Craft3e" from Hackage using stack

Simon Jakobi simon.jakobi at googlemail.com
Sat Apr 16 00:36:31 UTC 2016


Assuming that you would keep any book-related code in a local project,
here's how you'd create a local project with a dependency on Craft3e:

# Create a new project using ghc-7.8 (due to Craft3e's dependency on mtl <2.2)
$ stack --resolver ghc-7.8 new craft
$ cd craft
# Edit the library section of craft.cabal to contain a dependency on Craft3e:
#
#   build-depends:       base >= 4.7 && < 5
#                      , Craft3e
#
# Calculate a consistent set of packages to use in the project:
$ stack solver --update-config

Now you can write exercises etc. as library modules in the src
directory and use them interactively with stack repl.

If you haven't used stack before, you might also want to take a look
at the stack guide:
http://docs.haskellstack.org/en/stable/GUIDE/

Cheers,
Simon


More information about the Beginners mailing list