Rewriting to Haskell–Intro

Posted on February 26, 2020 by Riccardo

Rewriting to Haskell (Series)

Rewriting to Haskell–IntroRewriting to Haskell–Project SetupRewriting to Haskell–DeploymentRewriting to Haskell–Automatic FormattingRewriting to Haskell–ConfigurationRewriting to Haskell–Standing on the shoulders of RailsRewriting to Haskell–Making GHC More NitpickyRewriting to Haskell–TestingRewriting to Haskell–LintingRewriting to Haskell–Parsing Query ParamsRewriting to Haskell–Parsing Query Params, AgainRewriting 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!


It's one of the selected few I follow every week – Mateusz

Tired of RELEARNING webdev stuff?

  • A 100+ page book with the best links I curated over the years
  • An email once a week full of timeless software wisdom
  • Your recommended weekly dose of pink
  • Try before you buy? Check the archives.