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

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

MonadTrans AnsiPrinterT Source # 

Methods

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

Monad m => Monad (AnsiPrinterT m) Source # 

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 #

fail :: String -> AnsiPrinterT m a #

Monad m => Functor (AnsiPrinterT m) Source # 

Methods

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

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

Monad m => Applicative (AnsiPrinterT m) Source # 

Methods

pure :: a -> AnsiPrinterT m a #

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

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

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

MonadIO m => MonadIO (AnsiPrinterT m) Source # 

Methods

liftIO :: IO a -> AnsiPrinterT m a #

ChPrinter m => ChPrinter (AnsiPrinterT m) Source # 
ChPrinter m => ChExtendedPrinter (AnsiPrinterT m) Source # 
(Functor m, ChExpand m) => ChExpand (AnsiPrinterT m) Source # 

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