Module

Control.Monad.Logger.Trans

Package
purescript-monad-logger
Repository
cprussin/purescript-monad-logger

#LoggerT Source

newtype LoggerT m a

Constructors

Instances

#runLoggerT Source

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

#mapLoggerT Source

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

Re-exports from Control.Monad.Logger.Class

#warn Source

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

#trace Source

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

#info Source

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

#error Source

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

#debug Source

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

Re-exports from Control.Monad.Trans.Class

#MonadTrans Source

class 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