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

Text.Chatty.Extended.Printer

Description

Provides an extended printer class that supports colours.

Synopsis

Documentation

class ChPrinter m => ChExtendedPrinter m where Source #

Typeclass for all printers that support colourized output.

Minimal complete definition

estart, efin

Methods

ebracket :: Colour -> m a -> m a Source #

Run the function with the given colour.

eprint :: Colour -> String -> m () Source #

Print the string in the given colour.

eprintLn :: Colour -> String -> m () Source #

Print the string in the given colour and terminate the line.

enomask :: Colour -> String -> m () Source #

Print the string in the given colour without masking.

enomaskLn :: Colour -> String -> m () Source #

Print the string in the given colour without masking and terminate the line.

estart :: Colour -> m () Source #

Start using the specified colour.

efin :: m () Source #

Reset colour.

Instances

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Extended.HTML

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

Defined in Text.Chatty.Extended.ANSI

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

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

Defined in Text.Chatty.Interactor

data Tone Source #

Colour tone.

Constructors

Green 
Red 
Yellow 
Blue 
Black 
White 
Cyan 
Magenta 

data Colour Source #

Colour brightness

Constructors

Dull Tone 
Vivid Tone