symparsec-0.4.0: Type level string parser combinators
Safe HaskellSafe-Inferred
LanguageGHC2021

Symparsec.Parser.Common

Description

Common definitions for parsers.

Synopsis

Documentation

data FailChSym name e f Source #

Fail with the given message when given any character to parse.

Instances

Instances details
type App (FailChSym name e :: FunKind Char (s ~> Result s r) -> Type) (f :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Common

type App (FailChSym name e :: FunKind Char (s ~> Result s r) -> Type) (f :: Char)

data FailEndSym name e s Source #

Fail with the given message if we're at the end of the symbol.

Instances

Instances details
type App (FailEndSym name e :: FunKind a (Either E r) -> Type) (s :: a) Source # 
Instance details

Defined in Symparsec.Parser.Common

type App (FailEndSym name e :: FunKind a (Either E r) -> Type) (s :: a) = 'Left ('EBase name e) :: Either E r

data EmitEndSym r Source #

At the end of the symbol, emit parser state.

Instances

Instances details
type App (EmitEndSym :: FunKind b (Either E b) -> Type) (r :: b) Source # 
Instance details

Defined in Symparsec.Parser.Common

type App (EmitEndSym :: FunKind b (Either E b) -> Type) (r :: b) = 'Right r :: Either E b

type ErrParserLimitation msg = Text "parser limitation: " :<>: Text msg Source #

Helper for writing error messages to do with parser limitations (e.g. if you tried to use a non-consuming parser like Skip 0).