chatty-0.8.0.0: Some monad transformers and typeclasses for text in- and output abstraction.
Safe HaskellSafe
LanguageHaskell2010

Text.Chatty.Extended.ANSI

Description

Provides a ChExtendedPrinter that handles colours using standardized ANSI codes.

Synopsis

Documentation

newtype AnsiPrinterT m a Source #

A ChExtendedPrinter that uses ANSI colour codes.

Constructors

AnsiPrinter 

Fields

Instances

Instances details
MonadTrans AnsiPrinterT Source # 
Instance details

Defined in Text.Chatty.Extended.ANSI

Methods

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

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Extended.ANSI

Methods

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

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

return :: a -> AnsiPrinterT m a #

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

Defined in Text.Chatty.Extended.ANSI

Methods

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

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

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

Defined in Text.Chatty.Extended.ANSI

Methods

pure :: a -> AnsiPrinterT m a #

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

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

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

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

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

Defined in Text.Chatty.Extended.ANSI

Methods

liftIO :: IO a -> AnsiPrinterT m a #

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

Defined in Text.Chatty.Interactor

Methods

newAtom :: AnsiPrinterT m (Atom v) #

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

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

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

getAtom :: Atom v -> AnsiPrinterT m v #

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

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

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

Defined in Text.Chatty.Interactor

(Functor m, ChExpand m) => ChExpand (AnsiPrinterT m) Source # 
Instance details

Defined in Text.Chatty.Extended.ANSI

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Extended.ANSI

ChPrinter m => ChExtendedPrinter (AnsiPrinterT m) Source # 
Instance details

Defined in Text.Chatty.Extended.ANSI

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

mkColourInt :: Colour -> ColorIntensity Source #

Convert Chatty's colour intensity to ansi-terminal's one

mkColourCode :: Colour -> Color Source #

Convert Chatty's colour tone to ansi-terminal's one