Rewriting to Haskell–Intro

Posted on February 26, 2020 by Riccardo.

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

At Lunar Logic we use an internal web application to handle announcements. Stream has been used by the entire company for the last 6 years or so. Over time we have discovered it’s a great place to run tech experiments: production enough to feel real but internal enough not to cause too much damage if stuff goes wrong.

Stream was born as a Rails application, then transitioned to Rails API + Ember and after that Rails API + Elm. Rewriting the frontend to a functional language got some of us hooked into Functional Programming. As a matter of fact, on Slack somebody said “We’ve rewritten the frontend 100%. Do we really want to not have types in the backend too? 😏”. This seed has been growing for a couple of years, until today we decided to take action.

We gathered the FP aficionados in Lunar and decided to rewrite the backend to Haskell. In particular, we want to focus on the following goals:

  • no committments, we will go on as long as it’s fun;
  • making Haskell accessible to newcomers;
  • creating a proof of concepts for future projects;
  • small valuable iterations like we did for AirCasting.

I’ve personally worked in Ruby and JavaScript for a long time and the only real contribution I made to OSS was to Yesod 😅 We truly believe Functional Programming is a great tool and perfect place to give back, thus together with Alex, my partner in crime for this project, we want to spread the joy. Therefore, we decided to share with the world our journey rewriting Stream to Haskell.

Stay tuned!

Support my work by tweeting this article! 🙏