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

Data.Type.Symbol.Parser.Internal

Documentation

type ParserCh s r = Char -> s -> Result s r Source #

data Result s r Source #

Constructors

Cont s 
Done r 
Err ErrorMessage 

Instances

Instances details
type App (NatBaseChSym base parseDigit :: FunKind Char (Natural ~> Result Natural Natural) -> Type) (f :: Char) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Natural

type App (NatBaseChSym base parseDigit :: FunKind Char (Natural ~> Result Natural Natural) -> Type) (f :: Char) = NatBaseChSym1 base parseDigit f
type App (NatBaseChSym1 base parseDigit ch :: FunKind Natural (Result Natural Natural) -> Type) (n :: Natural) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Natural

type App (NatBaseChSym1 base parseDigit ch :: FunKind Natural (Result Natural Natural) -> Type) (n :: Natural) = NatBaseCh base parseDigit ch n
type App (IsolateChSym pCh pEnd :: FunKind Char ((Natural, s) ~> Result (Natural, s) r) -> Type) (f :: Char) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Isolate

type App (IsolateChSym pCh pEnd :: FunKind Char ((Natural, s) ~> Result (Natural, s) r) -> Type) (f :: Char) = IsolateChSym1 pCh pEnd f
type App (ThenChSym plCh prCh sr2 :: FunKind Char (Either sl (rl, sr1) ~> Result (Either sl (rl, sr1)) (rl, rr)) -> Type) (f :: Char) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Then

type App (ThenChSym plCh prCh sr2 :: FunKind Char (Either sl (rl, sr1) ~> Result (Either sl (rl, sr1)) (rl, rr)) -> Type) (f :: Char) = ThenChSym1 plCh prCh sr2 f
type App (ThenVRChSym plCh prCh sr2 :: FunKind Char (Either sl (rl, sr1) ~> Result (Either sl (rl, sr1)) rl) -> Type) (f :: Char) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Then.VoidRight

type App (ThenVRChSym plCh prCh sr2 :: FunKind Char (Either sl (rl, sr1) ~> Result (Either sl (rl, sr1)) rl) -> Type) (f :: Char) = ThenVRChSym1 plCh prCh sr2 f
type App (ThenVLChSym plCh prCh sr2 :: FunKind Char (Either sl sr1 ~> Result (Either sl sr1) rr) -> Type) (f :: Char) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Then.VoidLeft

type App (ThenVLChSym plCh prCh sr2 :: FunKind Char (Either sl sr1 ~> Result (Either sl sr1) rr) -> Type) (f :: Char) = ThenVLChSym1 plCh prCh sr2 f
type App (IsolateChSym1 pCh pEnd ch :: FunKind (Natural, s1) (Result (Natural, s1) r) -> Type) (s2 :: (Natural, s1)) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Isolate

type App (IsolateChSym1 pCh pEnd ch :: FunKind (Natural, s1) (Result (Natural, s1) r) -> Type) (s2 :: (Natural, s1)) = IsolateCh pCh pEnd ch s2
type App (ThenChSym1 plCh prCh sr2 ch :: FunKind (Either sl (rl, sr1)) (Result (Either sl (rl, sr1)) (rl, rr)) -> Type) (s :: Either sl (rl, sr1)) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Then

type App (ThenChSym1 plCh prCh sr2 ch :: FunKind (Either sl (rl, sr1)) (Result (Either sl (rl, sr1)) (rl, rr)) -> Type) (s :: Either sl (rl, sr1)) = ThenCh plCh prCh sr2 ch s
type App (ThenVRChSym1 plCh prCh sr2 ch :: FunKind (Either sl (rl, sr1)) (Result (Either sl (rl, sr1)) rl) -> Type) (s :: Either sl (rl, sr1)) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Then.VoidRight

type App (ThenVRChSym1 plCh prCh sr2 ch :: FunKind (Either sl (rl, sr1)) (Result (Either sl (rl, sr1)) rl) -> Type) (s :: Either sl (rl, sr1)) = ThenVRCh plCh prCh sr2 ch s
type App (ThenVLChSym1 plCh prCh sr2 ch :: FunKind (Either sl sr1) (Result (Either sl sr1) rr) -> Type) (s :: Either sl sr1) Source # 
Instance details

Defined in Data.Type.Symbol.Parser.Then.VoidLeft

type App (ThenVLChSym1 plCh prCh sr2 ch :: FunKind (Either sl sr1) (Result (Either sl sr1) rr) -> Type) (s :: Either sl sr1) = ThenVLCh plCh prCh sr2 ch s

type ParserChSym s r = Char ~> (s ~> Result s r) Source #

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) 

type family RunParser' pCh pEnd idx s msym where ... Source #

Equations

RunParser' pCh pEnd idx s 'Nothing = RunParserEnd idx (pEnd @@ s) 
RunParser' pCh pEnd idx s ('Just '(ch, sym)) = RunParser'' pCh pEnd idx ch ((pCh @@ ch) @@ s) sym 

type family RunParserEnd idx end where ... Source #

Equations

RunParserEnd idx ('Left e) = 'Left e 
RunParserEnd idx ('Right r) = 'Right '(r, "") 

type family RunParser'' pCh pEnd idx ch res sym where ... Source #

Equations

RunParser'' pCh pEnd idx ch ('Err e) sym = 'Left e 
RunParser'' pCh pEnd idx ch ('Done r) sym = 'Right '(r, sym) 
RunParser'' pCh pEnd idx ch ('Cont s) sym = RunParser' pCh pEnd (idx + 1) s (UnconsSymbol sym)