haskell: Tidy up the parser using proper monadic combinators.