Skip to content

tracing-megaparsec #500

Open
Open
@yaitskov

Description

@yaitskov

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions