chatty-0.5.4.0: Some monad transformers and typeclasses to simplify I/O on a transformer stack.

Safe HaskellSafe-Inferred

Text.Chatty.Extended.Printer

Description

Provides an extended printer class that supports colours.

Synopsis

Documentation

class MonadPrinter m => ExtendedPrinter m whereSource

Typeclass for all printers that support colourized output.

Methods

ebracket :: Colour -> m a -> m aSource

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.

data Tone Source

Colour tone.

Constructors

Green 
Red 
Yellow 
Blue 
Black 
White 
Cyan 
Magenta 

data Colour Source

Colour brightness

Constructors

Dull Tone 
Vivid Tone