Closed
Description
for attoparsec i was using this debug function
debug :: Parser a -> Parser a
debug p = do
(consumed, a) <- match p
remaining <- lookAhead takeText
traceM ("consumed: " ++ show consumed)
traceM ("remaining: " ++ show remaining)
return a
I couldn't find an equivalent function for match
and takeText
. How can i debug a parser written with megaparsec?