Module
Uncurried.ReaderT
- Package
- purescript-uncurried-transformers
- Repository
- PureFunctor/purescript-uncurried-transformers
This module defines the reader monad transformer, ReaderT
.
#ReaderT Source
newtype ReaderT :: Type -> (Type -> Type) -> Type -> Type
newtype ReaderT r m a
The reader monad transformer, implemented as a newtytpe over
RWSET
. Note that it's not recommended to stack newtypes of
RWSET
together as it incurs an indeterminate performance
penalty that would otherwise be solved by just using RWSET
.
Constructors
Instances
Functor (ReaderT r m)
Apply (ReaderT r m)
Applicative (ReaderT r m)
Bind (ReaderT r m)
Monad (ReaderT r m)
(MonadEffect m) => MonadEffect (ReaderT r m)
MonadRec (ReaderT r m)
MonadAsk r (ReaderT r m)
MonadReader r (ReaderT r m)
MonadTrans (ReaderT r)
(Semigroup a) => Semigroup (ReaderT r m a)
(Monoid a) => Monoid (ReaderT r m a)
Lazy (ReaderT r m a)
(Monoid w, MonadTell w m) => MonadTell w (ReaderT r m)
(Monoid w, MonadRec m, MonadWriter w m) => MonadWriter w (ReaderT r m)
(MonadState s m) => MonadState s (ReaderT r m)
(MonadThrow e m) => MonadThrow e (ReaderT r m)
(MonadRec m, MonadError e m) => MonadError e (ReaderT r m)
#runReaderT Source
runReaderT :: forall r m a. MonadRec m => r -> ReaderT r m a -> m a
Runs a computation inside of ReaderT
.
#hoistReaderT Source
hoistReaderT :: forall r m n a. (m ~> n) -> ReaderT r m a -> ReaderT r n a
Modifies the monadic context of a ReaderT
.
#mapReaderT Source
mapReaderT :: forall r m1 m2 a1 a2. MonadRec m1 => Functor m2 => (m1 a1 -> m2 a2) -> ReaderT r m1 a1 -> ReaderT r m2 a2
Modifies the result type of a ReaderT
.
#withReaderT Source
withReaderT :: forall r1 r2 m a. (r2 -> r1) -> ReaderT r1 m a -> ReaderT r2 m a
Modifies the environment type of a ReaderT
.