ADPfusion-0.5.1.0: Efficient, high-level dynamic programming.

Safe HaskellNone
LanguageHaskell2010

ADP.Fusion.Term.Chr.Type

Description

TODO Rename Chr to Vtx, a vertex parser is a generalization of a char parser. But this is only semantics, so not super important to do now.

Synopsis

Documentation

data Chr r x where Source

A generic Character parser that reads a single character but allows passing additional information.

Chr expects a function to retrieve r at index position, followed by the actual generic vector with data.

Constructors

Chr :: Vector v x => (v x -> Int -> r) -> !(v x) -> Chr r x 

Instances

(Show i, Show (RunningIndex i), Show r, Show (Elm ls i)) => Show (Elm ((:!:) ls (Chr r x)) i) Source 
Build (Chr r x) Source 
Element ls i => Element ((:!:) ls (Chr r x)) i Source 
type Stack (Chr r x) = (:!:) S (Chr r x) 
data Elm ((:!:) ls (Chr r x)) = ElmChr !r !(RunningIndex i) !(Elm ls i) Source 
type Arg ((:!:) ls (Chr r x)) = (:.) (Arg ls) r Source 
type TermArg (Chr r x) = r Source 

chr :: Vector v x => v x -> Chr x x Source

smart constructor for regular 1-character parsers

chrLeft :: Vector v t => v t -> Chr (Maybe t, t) t Source

Smart constructor for Maybe Peeking, followed by a character.