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

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.

data Tone Source

Colour tone.

Constructors

Green 
Red 
Yellow 
Blue 
Black 
White 
Cyan 
Magenta 

data Colour Source

Colour brightness

Constructors

Dull Tone 
Vivid Tone