representable-functors-2.1.2: Representable functors

Stabilityexperimental
Maintainerekmett@gmail.com
Safe HaskellSafe-Infered

Control.Monad.Representable.Reader

Contents

Description

Representable functors on Hask all monads, being isomorphic to a reader monad.

Synopsis

Representable functor monad

reader :: Representable f => (Key f -> b) -> Reader f bSource

runReader :: Indexable f => Reader f b -> Key f -> bSource

Monad Transformer

newtype ReaderT f m b Source

Constructors

ReaderT 

Fields

getReaderT :: f (m b)
 

Instances

(Representable f, Monad m, ~ * (Key f) e) => MonadReader e (ReaderT f m) 
(Representable f, MonadWriter w m) => MonadWriter w (ReaderT f m) 
Representable f => MonadTrans (ReaderT f) 
(Representable f, Monad m) => Monad (ReaderT f m) 
(Functor f, Functor m) => Functor (ReaderT f m) 
(Representable f, Applicative m) => Applicative (ReaderT f m) 
(Foldable f, Foldable m) => Foldable (ReaderT f m) 
(Traversable f, Traversable m) => Traversable (ReaderT f m) 
(Representable f, Representable m, Semigroup (Key f), Semigroup (Key m), Monoid (Key f), Monoid (Key m)) => Comonad (ReaderT f m) 
(Representable f, Representable m, Semigroup (Key f), Semigroup (Key m)) => Extend (ReaderT f m) 
(Representable f, Distributive m) => Distributive (ReaderT f m) 
(Keyed f, Keyed m) => Keyed (ReaderT f m) 
(Representable f, Representable m) => Zip (ReaderT f m) 
(Representable f, Representable m) => ZipWithKey (ReaderT f m) 
(Indexable f, Indexable m) => Indexable (ReaderT f m) 
(Lookup f, Lookup m) => Lookup (ReaderT f m) 
(Adjustable f, Adjustable m) => Adjustable (ReaderT f m) 
(FoldableWithKey f, FoldableWithKey m) => FoldableWithKey (ReaderT f m) 
(FoldableWithKey1 f, FoldableWithKey1 m) => FoldableWithKey1 (ReaderT f m) 
(TraversableWithKey f, TraversableWithKey m) => TraversableWithKey (ReaderT f m) 
(TraversableWithKey1 f, TraversableWithKey1 m) => TraversableWithKey1 (ReaderT f m) 
(Representable f, MonadIO m) => MonadIO (ReaderT f m) 
(Traversable1 f, Traversable1 m) => Traversable1 (ReaderT f m) 
(Foldable1 f, Foldable1 m) => Foldable1 (ReaderT f m) 
(Representable f, Apply m) => Apply (ReaderT f m) 
(Representable f, Bind m) => Bind (ReaderT f m) 
(Representable f, Representable m) => Representable (ReaderT f m) 

ask :: MonadReader r m => m r

Retrieves the monad environment.

local

Arguments

:: MonadReader r m 
=> forall a .  
=> (r -> r)

The function to modify the environment.

-> m a

Reader to run in the modified environment.

-> m a 

Executes a computation in a modified environment.