You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def laLexer : Parsec Char String Unit String :=
s.lookAhead ((s.stringP "|" <* (void (c.eol >>= fun x => do
dbg_trace! x
pure x)
<|> c.eof)) <|> s.stringP " ")
It's error-prone. We'd rather have this monadic bind with a trace in a separate combinator!
How?
Write such combinator in Common.lean.
The text was updated successfully, but these errors were encountered:
Why?
While debugging combinatorial parsers, people often wrap a parser into debug like so:
becomes
It's error-prone. We'd rather have this monadic bind with a trace in a separate combinator!
How?
Common.lean
.The text was updated successfully, but these errors were encountered: