On Sun, Feb 21, 2010 at 4:36 AM, Magnus Therning <magnus@therning.org> wrote:
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.

It would be easy enough to add this, but you'd end up with a slightly convoluted API. Because of the presence of fail in all monadic APIs, you'd have to support only-a-string as a failure result in some form, so your failure type would have to be something like Either String a.

There's no support for this in attoparsec simply because I haven't needed it. I suspect the same is true of other libraries, nothing deeper.