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
I saw there is Text.Megaparsec.Debug. It has same problem as manual printf - it is expensive to add log statements, to keep them and remove, because it requires manual labor.
Parser built with the library is not transparent enough for debugging.
Transparency is expensive for production.
I would like to have automatic tracer capability. All combinators log name (type, char expected), current position and a few chars from input before attempt to parse into additional state field which is return together with error.
Overhead for production is solved by locating all combinators with tracing capability into separate cabal package, let say tracing-megaparsec. Then it is easy to flip package in cabal with flag and select failing test to run.
The text was updated successfully, but these errors were encountered:
Hi,
I saw there is
Text.Megaparsec.Debug
. It has same problem as manual printf - it is expensive to add log statements, to keep them and remove, because it requires manual labor.Parser built with the library is not transparent enough for debugging.
Transparency is expensive for production.
I would like to have automatic tracer capability. All combinators log name (type, char expected), current position and a few chars from input before attempt to parse into additional state field which is return together with error.
Overhead for production is solved by locating all combinators with tracing capability into separate cabal package, let say tracing-megaparsec. Then it is easy to flip package in cabal with flag and select failing test to run.
The text was updated successfully, but these errors were encountered: