chatty-0.7.0.0: Some monad transformers and typeclasses for abstraction of global dependencies.

Safe HaskellSafe
LanguageHaskell2010

Text.Chatty.Scanner.Buffered

Description

Provides a typeclass for buffered scanners as well as a buffering monad transformer.

Synopsis

Documentation

class ChScanner m => ChBufferedScanner m where Source

Typeclass for all buffered ChScanners.

Methods

mpeek1 :: m Char Source

Scan the next character without removing it.

mprepend :: String -> m () Source

Prepend the given character to the scannable input.

class ChBufferedScanner m => ChStackBufferedScanner m where Source

Typeclass for all BufferedScanners with support for pushing and popping.

Methods

mpush :: m () Source

Push the current input state to the stack.

mpop :: m () Source

Pop the previous input state from the stack.