purescript-contrib/purescript-string-parsers

Position in error

Closed this issue · 3 comments

At the moment the parser gives errors like (Left Could not match character '"'), would be handy to have position information about the error.

Fixing this would require a breaking change due to the type signature of runParser. It also seems like unParser is what exposes the additional info so one can print their own parser. However, it's not user friendly to know that.

Nevermind. We could just add another variant of runParser that returns Either String a.