parsley-core-1.1.0.0: A fast parser combinator library backed by Typed Template Haskell
Safe HaskellNone
LanguageHaskell2010

Parsley.Internal.Backend.Machine.InputRep

Synopsis

Documentation

type family Rep input where ... Source #

type OffWith ts = (# Int#, ts #) Source #

offWithSame :: Code (# Int#, ts #) -> Code (# Int#, ts #) -> Code Bool Source #

offWithShiftRight :: Code (Int -> ts -> ts) -> Code (# Int#, ts #) -> Code Int# -> Code (# Int#, ts #) Source #

data Stream Source #

An input type that represents an infinite stream of input characters.

Since: 0.1.0.0

Instances

Instances details
PositionOps Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.InputOps

Methods

same :: forall (rep :: TYPE (RepKind Stream)). rep ~ Rep Stream => Proxy Stream -> Code rep -> Code rep -> Code Bool Source #

shiftRight :: forall (rep :: TYPE (RepKind Stream)). rep ~ Rep Stream => Proxy Stream -> Code rep -> Code Int# -> Code rep Source #

InputPrep Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.InputOps

Methods

prepare :: forall (rep :: TYPE (RepKind Stream)). rep ~ Rep Stream => Code Stream -> Code (InputDependant rep) Source #

LogHandler Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.Ops

Methods

logHandler :: forall s a (xs :: [Type]) (n :: Nat) ks. (?ops :: InputOps (Rep Stream)) => String -> Ctx s Stream a -> Γ s Stream xs ('Succ n) ks a -> Code (Rep Stream) -> Code (Handler s Stream a) Source #

RecBuilder Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.Ops

Methods

buildIter :: ReturnOps Stream => Ctx s Stream a -> MVar Void -> Machine s Stream '[] One Void a -> (Code (Rep Stream) -> Code (Handler s Stream a)) -> Code (Rep Stream) -> Code (ST s (Maybe a)) Source #

buildRec :: forall (rs :: [Type]) s a r. Regs rs -> Ctx s Stream a -> Machine s Stream '[] One r a -> Code (Func rs s Stream a r) Source #

JoinBuilder Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.Ops

Methods

setupJoinPoint :: forall x s (xs :: [Type]) (n :: Nat) r a. ΦVar x -> Machine s Stream (x ': xs) n r a -> Machine s Stream xs n r a -> MachineMonad s Stream xs n r a Source #

ReturnOps Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.Ops

ContOps Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.Ops

Methods

suspend :: forall s x (xs :: [Type]) (n :: Nat) r a. (Γ s Stream (x ': xs) n r a -> Code (ST s (Maybe a))) -> Γ s Stream xs n r a -> Code (Cont s Stream a x) Source #

HandlerOps Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.Ops

Methods

buildHandler :: forall s (xs :: [Type]) (n :: Nat) r a. Γ s Stream xs n r a -> (Γ s Stream (Stream ': xs) n r a -> Code (ST s (Maybe a))) -> Code (Rep Stream) -> Code (Handler s Stream a) Source #

fatal :: Code (Handler s Stream a) Source #

Input Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine