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.Types.Coins

Description

This module exposes Coins and the relevant operations. These are used by constant input analysis to side-step unnecessary length checks and character reads (in the case of lookahead).

Since: 1.5.0.0

Synopsis

Documentation

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 #

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

pattern Zero :: Coins Source #

Makes a Coins value of 0.

Since: 1.5.0.0