Safe Haskell | None |
---|---|
Language | Haskell2010 |
Pure implementation of logging action.
Synopsis
- newtype PureLoggerT msg m a = PureLoggerT {
- runPureLoggerT :: StateT (Seq msg) m a
- runPureLogT :: Functor m => PureLoggerT msg m a -> m (a, [msg])
- type PureLogger msg a = PureLoggerT msg Identity a
- runPureLog :: PureLogger msg a -> (a, [msg])
- logMessagePure :: Monad m => LogAction (PureLoggerT msg m) msg
Documentation
newtype PureLoggerT msg m a Source #
Pure monad transformer for logging. Can log any msg
messages. Allows to
log messages by storing them in the internal state.
PureLoggerT | |
|
Instances
runPureLogT :: Functor m => PureLoggerT msg m a -> m (a, [msg]) Source #
Returns result value of PureLoggerT
and list of logged messages.
type PureLogger msg a = PureLoggerT msg Identity a Source #
PureLoggerT
specialized to Identity
runPureLog :: PureLogger msg a -> (a, [msg]) Source #
Returns result value of PureLogger
and list of logged messages.
logMessagePure :: Monad m => LogAction (PureLoggerT msg m) msg Source #
LogAction
that prints msg
by appending it to the end of the sequence.