Early thoughts on Haskell

Posted on September 3, 2018

I’m only a month in, and it hasn’t been the type drive oasis I had hoped — that said it’s not all bad.

The Bad

Unsafe functions in the standard prelude — head throws an exception if called with an empty list!

Libraries throwing exceptions if there is IO, rather using the type system to indicate the possibility of errors.

The Good

Compile time — after Scala it is blindingly quick.

hlint and ghc_mod are wonderful, constantly offering succinct ways to structure ones code.

I’m using Microsoft’s Visual Studio Code with the Haskell Language Server which is provides a wrapper around HIE and it’s mostly wonderful. I said mostly as sometimes it just stops. The shutdown / startup is so quick that I haven’t looked into why and just restart.

Cabal is helpful

 $ cabal build
Warning: The package list for 'hackage.haskell.org' is 19 days old.
Run 'cabal update' to get the latest list of available packages.

A concise and helpful message with a clear path to resolution.

cabal gen-bounds1 is wonderful, it will attempt to suggest a set of dependency versions for your project. Which means you can add dependencies to your project and not worry immediately what version is needed.

Next Steps

I am in a privileged position of knowing wonderfully smart and helpful people who have been able to share their experience with the ecosystem. Their learning can be distilled to:

So with my first application in production I’m off to learn about custom preludes and Freer monads.


  1. gen-bounds.