I don't think Parsec is "extremely slow." It's not as fast as attoparsec, but not bad either.
Trifecta has the best error messages, but takes some more work to fully make the error messages great.
Trifecta has the best error messages, but takes some more work to fully make the error messages great.
Took around 20 seconds to parse a few hundred thousand lines (almost no backtracking, too).
Attoparsec/parsec have very similar APIs. I wonder why it cannot parse optimistically with attoparsec, and in case of failure - re-parse with parsec to get a nice error message. This should yield the best of both worlds?
[1]: https://github.com/merijn/lambda-except [2]: https://github.com/quchen/stgi/blob/master/src/Stg/Parser/Pa...