Rewriting to Haskell–Project Setup
Rewriting to Haskell (Series)Rewriting to Haskell–Intro Rewriting to Haskell–Project Setup Rewriting to Haskell–Deployment Rewriting to Haskell–Automatic Formatting Rewriting to Haskell–Configuration Rewriting to Haskell–Standing on the shoulders of Rails Rewriting to Haskell–Making GHC More Nitpicky Rewriting to Haskell–Testing Rewriting to Haskell–Linting Rewriting to Haskell–Parsing Query Params Rewriting to Haskell–Parsing Query Params, Again Rewriting to Haskell–Errors
We decided to go with Servant to rewrite the current Rails API for Stream. We don’t really have a strong reason for that. We just like it and we believe it will allow us to do some cool stuff down the line!
Also, we picked Stack because it’s what we are used to and seems to be less cryptic than Cabal.
We created the project with the following command:
stack new haskell servant # ^ Create a new project.. # ^ ..in a new haskell/ folder.. # ^ ..using the Servant template.
The Servant template creates a dummy application with an hardcoded endpoint and some tests that allow to start playing with code right away.
Stream is already using CircleCI, so we opened the Haskell languge guide and started copy / pasting like there was no tomorrow.
We ended up with the following config.yml file that supports Rails, Elm and Haskell. See inlined comments for more info.
I need your help to make the blog awesome. Here's a survey. Since there are no required questions, you decide how much time to spend on it.
Support my work by tweeting this article! 🙏