Skip to content

Add drop to Text.Megaparsec #540

Open
@sol

Description

@sol

I'd love to have Text.Megaparsec to export

-- | Advance by / ignore `n` input tokens
drop :: MonadParsec e s m => Int -> m ()
drop n = P.skipCount n $ P.token Just mempty

(or possibly implement it with getOffset / setOffset, if that results in the exact same parser state, not sure)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions