How to install a package using stack?

Ben picture Ben · Jun 24, 2015 · Viewed 29.6k times · Source

Using cabal, I could install hakyll with the command:

cabal install hakyll

How can I do the same thing using stack?

Answer

user2913694 picture user2913694 · Aug 1, 2015
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.