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

Safe HaskellSafe-Inferred

Text.Chatty.Channel.Printer

Description

Provides a printer class that offers several channels.

Synopsis

Documentation

class (MonadPrinter m, Eq c) => ChannelPrinter c m whereSource

Typeclass for all printers that offer several channels.

Methods

cbracket :: c -> m a -> m aSource

Run the function with the given channel.

cstart :: c -> m ()Source

Switch to the given channel

cfin :: c -> m ()Source

Return to the previous channel. The argument is bogus (just for type inference).

cprint :: c -> String -> m ()Source

Print the string to the given channel.

cthis :: m cSource

Return the current channel.

Instances

ChannelPrinter Bool m0 => ChannelPrinter Bool (HandleCloserT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (InRedirT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (QuietT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (HereStringT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (SpawnOverlayT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (NullExpanderT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (ExpanderT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (HistoryT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (HtmlPrinterT m0) 
ChannelPrinter Bool m0 => ChannelPrinter Bool (AnsiPrinterT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (HandleCloserT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (InRedirT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (QuietT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (HereStringT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (SpawnOverlayT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (NullExpanderT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (ExpanderT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (HistoryT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (HtmlPrinterT m0) 
ChannelPrinter Int m0 => ChannelPrinter Int (AnsiPrinterT m0) 
(Eq c, MonadPrinter m) => ChannelPrinter c (JoinerT m) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (HandleCloserT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (InRedirT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (QuietT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (HereStringT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (SpawnOverlayT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (NullExpanderT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (ExpanderT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (HistoryT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (HtmlPrinterT m0) 
ChannelPrinter Handle m0 => ChannelPrinter Handle (AnsiPrinterT m0) 
(Eq c, MonadPrinter m) => ChannelPrinter c (FilterT c m) 
(Eq c, Monad m) => ChannelPrinter c (ArchiverT c m) 

newtype ArchiverT c m a Source

Catches all output on multiple channels.

Constructors

Archiver 

Fields

runArchiverT' :: ([(c, [String])], [c]) -> m (a, ([(c, [String])], [c]))
 

runArchiverT :: (Eq c, Monad m) => c -> ArchiverT c m a -> m (a, [(c, Replayable)])Source

newtype FilterT c m a Source

Forwards output only on a specific channel.

Constructors

Filter 

Fields

runFilterT :: (c, [c]) -> m (a, [c])
 

newtype JoinerT m a Source

Joins all output regardless of its channel.

Constructors

Joiner 

Fields

runJoinerT :: m a