The parser is currently using attoparsec which is generalised by the parsers library. It may be worthwhile exploiting this generalisation for many reasons, including to make the code more readable and testable (parametricity).
http://hackage.haskell.org/package/parsers