symbol-parser-0.2.0: Type level string parser combinators
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Type.Symbol.Parser

Synopsis

Base definitions

type Parser s r = (ParserChSym s r, ParserEndSym s r, s) Source #

type family RunParser p sym where ... Source #

Equations

RunParser '(pCh, pEnd, s) sym = RunParser' pCh pEnd 0 s (UnconsSymbol sym) 

Parsers

Combinators

type family Isolate n p where ... Source #

Equations

Isolate n '(pCh, pEnd, s) = '(IsolateChSym pCh pEnd, IsolateEndSym, '(n, s)) 

type (:<*>:) pl pr = Then pl pr Source #

Sequence parsers, returning both values in a tuple.

type (:*>:) pl pr = ThenVL pl pr Source #

Sequence parsers, discarding the return value of the left parser

type (:<*:) pl pr = ThenVR pl pr Source #

Sequence parsers, discarding the return value of the right parser.

Consider using :*>: instead, which is simpler and potentially faster since we parse L->R.

Primitives

type Drop n = '(DropChSym, DropEndSym, n) Source #

type Literal sym = '(LiteralChSym, LiteralEndSym, UnconsSymbol sym) Source #

type End = '(EndChSym, EndEndSym, '()) Source #

Naturals

type NatBase base parseDigit = '(NatBaseChSym base parseDigit, NatBaseEndSym, 0) Source #