Safe Haskell | Safe-Inferred |
---|
Provides a printer class that offers several channels.
- class (MonadPrinter m, Eq c) => ChannelPrinter 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 (MonadPrinter m, Eq c) => ChannelPrinter c m whereSource
Typeclass for all printers that offer several channels.
cbracket :: c -> m a -> m aSource
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.
newtype ArchiverT c m a Source
Catches all output on multiple channels.
Archiver | |
|
type IntArchiverT = ArchiverT IntSource
type BoolArchiverT = ArchiverT BoolSource
type HandleArchiverT = ArchiverT HandleSource
runArchiverT :: (Eq c, Monad m) => c -> ArchiverT c m a -> m (a, [(c, Replayable)])Source
Forwards output only on a specific channel.
Filter | |
|
type IntFilterT = FilterT IntSource
type BoolFilterT = FilterT BoolSource
type HandleFilterT = FilterT HandleSource
Joins all output regardless of its channel.
Joiner | |
|
MonadTrans JoinerT | |
(Eq c, MonadPrinter m) => ChannelPrinter c (JoinerT m) | |
Monad m => Monad (JoinerT m) | |
Functor m => Functor (JoinerT m) | |
MonadIO m => MonadIO (JoinerT m) | |
MonadRandom m0 => MonadRandom (JoinerT m0) | |
MonadClock m0 => MonadClock (JoinerT m0) | |
MonadFinalizer m0 => MonadFinalizer (JoinerT m0) | |
MonadScanner m0 => MonadScanner (JoinerT m0) | |
MonadPrinter m => MonadPrinter (JoinerT m) | |
MonadSpawn m0 => MonadSpawn (JoinerT m0) | |
MonadExpand m0 => MonadExpand (JoinerT m0) | |
ExpanderEnv m0 => ExpanderEnv (JoinerT m0) | |
HistoryEnv m0 => HistoryEnv (JoinerT m0) |