Initial transcription to Haskell