parsley-core-2.3.0.0: A fast parser combinator library backed by Typed Template Haskell
LicenseBSD-3-Clause
MaintainerJamie Willis
Stabilityunstable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Parsley.Internal.Backend.Machine

Description

Since: 0.1.0.0

Synopsis

Documentation

class (InputPrep input, Ops input) => Input input Source #

This class is exposed to parsley itself and is used to denote which types may be used as input for a parser.

Since: 0.1.0.0

Instances

Instances details
Input ByteString Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine

Input ByteString Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine

Input CharList Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine

Input Stream Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine

Input Text16 Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine

Input Text Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine

Input String Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine

Input (UArray Int Char) Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine

eval :: forall input a. (Input input, Trace, ?flags :: Flags) => Code input -> (LetBinding input a a, DMap MVar (LetBinding input a)) -> Code (Maybe a) Source #

This function is exposed to parsley itself and is used to generate the Haskell code for a parser.

Since: 0.1.0.0

data Coins Source #

Packages together the known input that can be consumed after a length-check with the number of characters that can be rewound on a lookahead backtrack.

Since: 1.5.0.0

Constructors

Coins 

Fields

Instances

Instances details
Show Coins Source # 
Instance details

Defined in Parsley.Internal.Backend.Machine.Types.Coins

Methods

showsPrec :: Int -> Coins -> ShowS #

show :: Coins -> String #

showList :: [Coins] -> ShowS #

pattern Zero :: Coins Source #

Makes a Coins value of 0.

Since: 1.5.0.0

minCoins :: Coins -> Coins -> Coins Source #

Takes the pairwise min of two Coins values.

Since: 1.5.0.0

plus1 :: CharPred -> Coins -> Coins Source #

Adds 1 to all the Coins values.

Since: 1.5.0.0

minus :: Coins -> Int -> Coins Source #

Since: 1.5.0.0

user :: Defunc a -> Defunc a Source #

Promotes a Defunc value from the Frontend API into a Backend one.

Since: 1.1.0.0

data LetBinding o a x Source #

Packages a binding along with its free registers that are required for it, which are left existential. This is possible since the Regs datatype serves as a singleton-style witness of the original registers and their types. It also requires Metadata to be provided, sourced from analysis.

Since: 1.5.0.0

makeLetBinding :: Binding o a x -> Set SomeΣVar -> Metadata -> LetBinding o a x Source #

Given a Binding , a set of existential ΣVars, and some Metadata, produces a LetBinding instance.

Since: 1.5.0.0

newMeta :: Metadata Source #

Produces a new Metadata object, with fields initialised to sensible conservative defaults.

Since: 1.5.0.0