-
Notifications
You must be signed in to change notification settings - Fork 3
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] hide
combinator revives dead hints
#30
Comments
Actually, this isn't to do with the lexer at all. It feels reminiscent of j-mie6/parsley#167, which also materialised with whitespace, and also with square brackets. But with an entirely different parsing architecture, that's rather surprising! I'll take a look shortly and minimise it to something that doesn't involve the lexer |
Ok: ghci> parseRepl (optional digit <* char ']' <* hide (optional letter) <* eof) "]1"
(line 1, column 2):
unexpected "1"
expected digit or end of input
>]1
^ Turns out the |
hide
combinator revives dead hints
good' x st' = good x st' { Internal.hints = Internal.hints st } -- TODO: should this change valid offset? I believe the answer is categorically: yes, lol |
To reproduce, run
cabal repl
, thenObserve output
Expected output should not contain
expected "1"
.Seems to related to how whiteSpace is handled, after replacing
gigaparsec/src/Text/Gigaparsec/Internal/Token/Lexer.hs
Line 68 in 79736ee
with
apply = id
, the issue disappears.The text was updated successfully, but these errors were encountered: