[Haskell] Monadification as a refactoring