Haskell session 1 - Stack
Tue Jul 23, 2019 · 330 words · 2 min
Authors :  max

Learning Haskell

I spent the weekend learning some Haskell. My goals were:

I figured the above would be a nice whirlwind tour: not enough to start monad engineering, but enough to defend myself.

Stack

Stack is the build system I chose to use for the library and CLI. It seems a bit more modern and recommended than pure cabal, which ships with Haskell itself. Stack seems to provide a higher level wrapping around cabal to some extent, along with some other goodies like caching.

I also like Stack's commitment to reproducible builds, creating an environment per-project with its own ghc, the Haskell compiler. I actually don't even have ghc installed locally, so there's no chance I'm mucking up the build by having things on my system's PATH override any project-specific stuff.

The downside is that Stack can eat massive amounts of disk, as you'll have a ghc for even minor versions e.g. 8.4.2 vs. 8.4.3. Something to be aware of.

Hacking on stack basically involved looking at the documentation and various YAML files, so nothing too painful, yet.

Notes

Wrap up

It was pretty painless getting set up with stack, and creating a CLI/library project.

Next up: Haskell coding, xmobar detective work, and more.


posts · about · github · home