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
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