Transitioning from Scala to Haskell