Using cabal, I could install hakyll with the command:
cabal install hakyll
How can I do the same thing using stack?
Using cabal, I could install hakyll with the command:
cabal install hakyll
How can I do the same thing using stack?
This documentation worked for me
On package.yaml
add the library under dependencies
, for example:
dependencies:
- base >= 4.7 && < 5
- hakyll # added here
stack install hakyll
stack
offers a curated set of packages that won't blow your machine up. If you want to check what packages are available, or exactly what version is supported, or on what version of GHC
you can get it, check out https://www.stackage.org/.
For example, you can get hakyll 4.6.9.0
right now for both GHC 7.8.4
and GHC 7.10.1
. Pretty neat. - source
EDIT: I forgot to mention, Yuan Wang's method works for getting the version of hakyll
that is not curated into stackage
. It's up to you what version you need.
add hakyll in stack.yaml generated by
stack init
orstack new
yaml file should look like:
after that, run
stack solver
installs ithttps://github.com/commercialhaskell/stack/wiki/stack.yaml