Haskell's New Packaging Tool, "Stack"
FPComplete recently announced a new tool for working with Haskell projects, stack. Stack is a direct response to a big reported thorn in the side of anyone using Haskell, namely, working with cabal. There have been previous efforts in this area. The approach that I've had the most luck with was to use cabal sandboxes. But this is not a comprehensive solution. I would still find myself having to build everything from scratch all too often.
Stack promises to be a better way to work with Haskell projects. What it brings to the table is that it is one-stop. Stack will:
- Install a Haskell compiler, GHC
- Install all dependencies of the current project
To give you a feel for working with this tool, I'm going to use it to build and work with an existing Haskell project. If you'd like to follow along, go download stack.
I'm going to check out the source for my tiny slack bot, Spock's Brain.
git clone email@example.com:twopoint718/spocks-brain.git cd spocks-brain stack build stack exec bot
And that should be it. The bot will be running on port 8080.
This is a big deal! Stack removes a huge speed bump for getting new Haskell users up and running with the minimum of frustration. For experienced users, it eliminates a big headache for working with new projects. I want to congratulate everyone that's had a hand in making such a promising tool; thanks!
I hope to investigate how this tool plays with Halcyon for deployment.