Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Provides a printer class that offers several channels.
Synopsis
- class (ChPrinter m, Eq c) => ChChannelPrinter c m where
- newtype ArchiverT c m a = Archiver {
- runArchiverT' :: ([(c, [String])], [c]) -> m (a, ([(c, [String])], [c]))
- type IntArchiverT = ArchiverT Int
- type BoolArchiverT = ArchiverT Bool
- type HandleArchiverT = ArchiverT Handle
- runArchiverT :: (Eq c, Monad m) => c -> ArchiverT c m a -> m (a, [(c, Replayable)])
- newtype FilterT c m a = Filter {
- runFilterT :: (c, [c]) -> m (a, [c])
- type IntFilterT = FilterT Int
- type BoolFilterT = FilterT Bool
- type HandleFilterT = FilterT Handle
- newtype JoinerT m a = Joiner {
- runJoinerT :: m a
Documentation
class (ChPrinter m, Eq c) => ChChannelPrinter c m where Source #
Typeclass for all printers that offer several channels.
cbracket :: c -> m a -> m a Source #
Run the function with the given channel.
Switch to the given channel
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.
Return the current channel.
Instances
newtype ArchiverT c m a Source #
Catches all output on multiple channels.
Archiver | |
|
Instances
type IntArchiverT = ArchiverT Int Source #
type BoolArchiverT = ArchiverT Bool Source #
type HandleArchiverT = ArchiverT Handle Source #
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.
Filter | |
|
Instances
type IntFilterT = FilterT Int Source #
type BoolFilterT = FilterT Bool Source #
type HandleFilterT = FilterT Handle Source #
Joins all output regardless of its channel.
Joiner | |
|