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

Safe HaskellSafe
LanguageHaskell2010

Text.Chatty.Channel.Broadcast

Description

Provides a printer class that may broadcast to all channels that fulfill a condition.

Synopsis

Documentation

class ChChannelPrinter c m => ChBroadcaster c m where Source #

Typeclass for all channel printers that may broadcast to all channels that fulfill a condition.

Minimal complete definition

bprint

Methods

bprint :: (c -> m Bool) -> String -> m () Source #

Print the string to all channels that fulfill the current condition.

class ChBroadcaster c m => ChBroadcasterBracket c m where Source #

Typeclass for all broadcaster that may embrace sections

Minimal complete definition

bstart, bfin

Methods

bbracket :: (c -> m Bool) -> m a -> m a Source #

Run the function and print to all channels that fulfill the given condition.

bstart :: (c -> m Bool) -> m () Source #

From now on use the given condition to determine the channels to print to.

bfin :: (c -> m Bool) -> m () Source #

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