Parsec question

Mark Carroll mark at
Thu Jan 1 09:55:45 EST 2004

Thanks to Tom for his interesting points. I am still developing an
inuition for how the error reporting goes. (-:

On Thu, 1 Jan 2004, Derek Elkins wrote:

> > > testOr3 =   do{ try (string "(a"); char ')'; return "(a)" }
> example both issues come up.  If we successfully parse the
> "(a" then the second alternative "(b)" can't possibly succeed and since
> it can't succeed there's no point in saving the input "(a" to be
> reparsed when backtracking since there's no point in backtracking.

Ah, that makes sense - thanks! I think part of my problem might have been
the quoted and real brackets and braces - at least a couple of times, I
thought the char and the return were within the try. (-: I will try to
look more carefully next time.

-- Mark

More information about the Haskell-Cafe mailing list