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

Symparsec.Parser.Skip

Synopsis

Documentation

type Skip n = 'PParser SkipChSym SkipEndSym n Source #

Skip forward n characters. Fails if fewer than n characters are available'.

type family SkipCh ch n where ... Source #

Equations

SkipCh _ 0 = Done '() 
SkipCh _ n = Cont (n - 1) 

data SkipChSym f Source #

Instances

Instances details
KnownNat n => SingParser (Skip n :: PParser Natural ()) Source # 
Instance details

Defined in Symparsec.Parser.Skip

Associated Types

type PS (Skip n) :: s -> Type Source #

type PR (Skip n) :: r -> Type Source #

Methods

singParser' :: SParser (PS (Skip n)) (PR (Skip n)) (Skip n) Source #

type PR (Skip n :: PParser Natural ()) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type PR (Skip n :: PParser Natural ()) = SUnit
type PS (Skip n :: PParser Natural ()) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type PS (Skip n :: PParser Natural ()) = SNat
type App SkipChSym (f :: Char) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type App SkipChSym (f :: Char) = SkipChSym1 f

data SkipChSym1 ch n Source #

Instances

Instances details
type App (SkipChSym1 ch :: FunKind Natural (PResult Natural ()) -> Type) (n :: Natural) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type App (SkipChSym1 ch :: FunKind Natural (PResult Natural ()) -> Type) (n :: Natural) = SkipCh ch n

type family SkipEnd n where ... Source #

Equations

SkipEnd 0 = Right '() 
SkipEnd n = Left (ESkipPastEnd n) 

type ESkipPastEnd n = EBase "Skip" ((Text "tried to skip " :<>: Text (ShowNatDec n)) :<>: Text " chars from empty string") Source #

data SkipEndSym n Source #

Instances

Instances details
KnownNat n => SingParser (Skip n :: PParser Natural ()) Source # 
Instance details

Defined in Symparsec.Parser.Skip

Associated Types

type PS (Skip n) :: s -> Type Source #

type PR (Skip n) :: r -> Type Source #

Methods

singParser' :: SParser (PS (Skip n)) (PR (Skip n)) (Skip n) Source #

type PR (Skip n :: PParser Natural ()) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type PR (Skip n :: PParser Natural ()) = SUnit
type PS (Skip n :: PParser Natural ()) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type PS (Skip n :: PParser Natural ()) = SNat
type App SkipEndSym (n :: Natural) Source # 
Instance details

Defined in Symparsec.Parser.Skip

type App SkipEndSym (n :: Natural) = SkipEnd n