chatty-0.8.0.0: Some monad transformers and typeclasses for text in- and output abstraction.
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.

Instances

Instances details
ChBufferedScanner m => ChBufferedScanner (AtomStoreT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (CounterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (NullExpanderT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (HistoryT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (ExpanderT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (HandleCloserT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (RecorderT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (OutRedirT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (DeafT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (HtmlPrinterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChBufferedScanner m => ChBufferedScanner (AnsiPrinterT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Monad m => ChBufferedScanner (HereStringT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

ChScanner m => ChBufferedScanner (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

Monad m => ChBufferedScanner (StateT String m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

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.

Instances

Instances details
ChScanner m => ChStackBufferedScanner (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

newtype ScannerBufferT m a Source #

A buffering MonadScanner transformer that lets you use mpeek1 and mprepend everywhere.

Constructors

ScannerBuffer 

Fields

Instances

Instances details
MonadTrans ScannerBufferT Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

Methods

lift :: Monad m => m a -> ScannerBufferT m a #

ChChannelPrinter Bool m => ChChannelPrinter Bool (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChChannelPrinter Int m => ChChannelPrinter Int (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChChannelPrinter Handle m => ChChannelPrinter Handle (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Monad m => Monad (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

Methods

(>>=) :: ScannerBufferT m a -> (a -> ScannerBufferT m b) -> ScannerBufferT m b #

(>>) :: ScannerBufferT m a -> ScannerBufferT m b -> ScannerBufferT m b #

return :: a -> ScannerBufferT m a #

Monad m => Functor (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

Methods

fmap :: (a -> b) -> ScannerBufferT m a -> ScannerBufferT m b #

(<$) :: a -> ScannerBufferT m b -> ScannerBufferT m a #

Monad m => Applicative (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

Methods

pure :: a -> ScannerBufferT m a #

(<*>) :: ScannerBufferT m (a -> b) -> ScannerBufferT m a -> ScannerBufferT m b #

liftA2 :: (a -> b -> c) -> ScannerBufferT m a -> ScannerBufferT m b -> ScannerBufferT m c #

(*>) :: ScannerBufferT m a -> ScannerBufferT m b -> ScannerBufferT m b #

(<*) :: ScannerBufferT m a -> ScannerBufferT m b -> ScannerBufferT m a #

MonadIO m => MonadIO (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

Methods

liftIO :: IO a -> ScannerBufferT m a #

ChAtoms m => ChAtoms (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

Methods

newAtom :: ScannerBufferT m (Atom v) #

funAtom :: Atom b -> (b -> a) -> (b -> a -> b) -> ScannerBufferT m (Atom a) #

funAtom2 :: Atom b -> Atom c -> ((b, c) -> a) -> ((b, c) -> a -> (b, c)) -> ScannerBufferT m (Atom a) #

putAtom :: Atom v -> v -> ScannerBufferT m () #

getAtom :: Atom v -> ScannerBufferT m v #

dispAtom :: Atom v -> ScannerBufferT m () #

cloneAtom :: Atom v -> ScannerBufferT m (Atom v) #

ChCounter m => ChCounter (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChExpand m => ChExpand (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChHistoryEnv m => ChHistoryEnv (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChExpanderEnv m => ChExpanderEnv (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChFinalizer m => ChFinalizer (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChPrinter m => ChPrinter (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChExtendedPrinter m => ChExtendedPrinter (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Interactor

ChScanner m => ChScanner (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

ChScanner m => ChStackBufferedScanner (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered

ChScanner m => ChBufferedScanner (ScannerBufferT m) Source # 
Instance details

Defined in Text.Chatty.Scanner.Buffered