[Haskell-cafe] Re: Parsing of bytestrings with non-String errors?

Permjacov Evgeniy permeakra at gmail.com
Sun Feb 21 16:55:05 EST 2010

On 02/21/2010 11:57 PM, haskell-cafe-request at haskell.org wrote:
> Message: 2
> Date: Sun, 21 Feb 2010 12:36:21 +0000
> From: Magnus Therning <magnus at therning.org>
> Subject: [Haskell-cafe] Parsing of bytestrings with non-String errors?
> To: haskell-cafe <haskell-cafe at haskell.org>
> Message-ID: <4B8128C5.6030105 at therning.org>
> Content-Type: text/plain; charset="utf-8"
> I've looked at polyparse and attoparsec and they seem to have in common that
> the error always is a String.  My current ideas for a project would be a lot
> easier if I could just return some other type, something that I can pattern
> match on.
> Is there a parser combinator library out there that works on bytestrings and
> allows using a custom error type?
> Or maybe there's some very basic reason why String is so commonly used?

You can try to play with ParsecT / ErrorT

More information about the Haskell-Cafe mailing list