ptera-0.1.0.0: A parser generator
Safe HaskellNone
LanguageHaskell2010

Language.Parser.Ptera.Scanner

Documentation

type T = Scanner Source #

class Monad m => Scanner posMark elem m | m -> posMark, m -> elem where Source #

Methods

consumeInput :: m (Maybe elem) Source #

getPosMark :: m posMark Source #

seekToPosMark :: posMark -> m () Source #

scanMode :: ScanMode posMark -> m () Source #

Instances

Instances details
Scanner [e] e (ListScanner e) Source # 
Instance details

Defined in Language.Parser.Ptera.Scanner

data ScanMode posMark Source #

Constructors

ScanModeNoBack 
ScanModeNeedBack posMark 

Instances

Instances details
Eq posMark => Eq (ScanMode posMark) Source # 
Instance details

Defined in Language.Parser.Ptera.Scanner

Methods

(==) :: ScanMode posMark -> ScanMode posMark -> Bool #

(/=) :: ScanMode posMark -> ScanMode posMark -> Bool #

Show posMark => Show (ScanMode posMark) Source # 
Instance details

Defined in Language.Parser.Ptera.Scanner

Methods

showsPrec :: Int -> ScanMode posMark -> ShowS #

show :: ScanMode posMark -> String #

showList :: [ScanMode posMark] -> ShowS #

newtype ListScanner e a Source #

Constructors

ListScanner 

Fields

Instances

Instances details
Monad (ListScanner e) Source # 
Instance details

Defined in Language.Parser.Ptera.Scanner

Methods

(>>=) :: ListScanner e a -> (a -> ListScanner e b) -> ListScanner e b #

(>>) :: ListScanner e a -> ListScanner e b -> ListScanner e b #

return :: a -> ListScanner e a #

Functor (ListScanner e) Source # 
Instance details

Defined in Language.Parser.Ptera.Scanner

Methods

fmap :: (a -> b) -> ListScanner e a -> ListScanner e b #

(<$) :: a -> ListScanner e b -> ListScanner e a #

Applicative (ListScanner e) Source # 
Instance details

Defined in Language.Parser.Ptera.Scanner

Methods

pure :: a -> ListScanner e a #

(<*>) :: ListScanner e (a -> b) -> ListScanner e a -> ListScanner e b #

liftA2 :: (a -> b -> c) -> ListScanner e a -> ListScanner e b -> ListScanner e c #

(*>) :: ListScanner e a -> ListScanner e b -> ListScanner e b #

(<*) :: ListScanner e a -> ListScanner e b -> ListScanner e a #

Scanner [e] e (ListScanner e) Source # 
Instance details

Defined in Language.Parser.Ptera.Scanner

runListScanner :: ListScanner e a -> [e] -> a Source #