Skip to content

Add eof for Token parsers? #25

Closed
@hdgarrood

Description

@hdgarrood

Something like this:

eof :: forall a. Parser (List a) Unit
eof =
  get >>= \(input :: List a) ->
    unless (null input) (fail "expected eof")

I guess it would go into `Text.Parsing.Parser.Token?

By the way, is it right that we need that type annotation on input? Without it, type unification fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions