refactoring haskell test parser