Module

Control.Monad.Logger.Trans

#LoggerT

newtype LoggerT :: (Type -> Type) -> Type -> Typenewtype LoggerT m a

Constructors

Instances

#runLoggerT

runLoggerT :: forall m a. LoggerT m a -> (Message -> m Unit) -> m a

#mapLoggerT

mapLoggerT :: forall m a b. (m a -> m b) -> LoggerT m a -> LoggerT m b

Re-exports from Control.Monad.Logger.Class

#warn

warn :: forall m. MonadLogger m => TagSet -> String -> m Unit

#trace

trace :: forall m. MonadLogger m => TagSet -> String -> m Unit

#info

info :: forall m. MonadLogger m => TagSet -> String -> m Unit

#error

error :: forall m. MonadLogger m => TagSet -> String -> m Unit

#debug

debug :: forall m. MonadLogger m => TagSet -> String -> m Unit

Re-exports from Control.Monad.Trans.Class

#MonadTrans

class MonadTrans :: ((Type -> Type) -> Type -> Type) -> Constraintclass MonadTrans t  where

The MonadTrans type class represents monad transformers.

A monad transformer is a type constructor of kind (* -> *) -> * -> *, which takes a Monad as its first argument, and returns another Monad.

This allows us to add additional effects to an existing monad. By iterating this process, we create monad transformer stacks, which contain all of the effects required for a particular computation.

The laws state that lift is a Monad morphism.

Laws:

  • lift (pure a) = pure a
  • lift (do { x <- m ; y }) = do { x <- lift m ; lift y }

Members

Modules