foundation-0.0.29: Alternative prelude with batteries and no dependencies
Safe Haskell None
Language Haskell2010

Foundation.Monad.Reader

Description

The Reader monad transformer.

This is useful to keep a non-modifiable value in a context

Synopsis

MonadReader

ReaderT

data ReaderT r m a Source #

Reader Transformer

Instances

Instances details
MonadTrans ( ReaderT r) Source #
Instance details

Defined in Foundation.Monad.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a Source #

Monad m => Monad ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

Functor m => Functor ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b Source #

(<$) :: a -> ReaderT r m b -> ReaderT r m a Source #

( Monad m, MonadFix m) => MonadFix ( ReaderT s m) Source #
Instance details

Defined in Foundation.Monad.Reader

Methods

mfix :: (a -> ReaderT s m a) -> ReaderT s m a Source #

Applicative m => Applicative ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

MonadIO m => MonadIO ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

MonadFailure m => MonadFailure ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

Associated Types

type Failure ( ReaderT r m) Source #

MonadBracket m => MonadBracket ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

Methods

generalBracket :: ReaderT r m a -> (a -> b -> ReaderT r m ignored1) -> (a -> SomeException -> ReaderT r m ignored2) -> (a -> ReaderT r m b) -> ReaderT r m b Source #

MonadCatch m => MonadCatch ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

Methods

catch :: Exception e => ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a Source #

MonadThrow m => MonadThrow ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

Monad m => MonadReader ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

Associated Types

type ReaderContext ( ReaderT r m) Source #

type Failure ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader

type ReaderContext ( ReaderT r m) Source #
Instance details

Defined in Foundation.Monad.Reader