representable-functors-3.0: Representable functors

Safe HaskellSafe-Infered




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


Representable functor monad

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

Monad Transformer

newtype ReaderT f m b Source




getReaderT :: f (m b)


(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, Monoid (Key f), Monoid (Key m)) => Comonad (ReaderT f m) 
(Representable f, Distributive m) => Distributive (ReaderT f m) 
(Representable f, Keyed m) => Keyed (ReaderT f m) 
(Representable f, Zip m) => Zip (ReaderT f m) 
(Representable f, ZipWithKey m) => ZipWithKey (ReaderT f m) 
(Indexable f, Indexable m) => Indexable (ReaderT f m) 
(Indexable 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) 
(Representable f, TraversableWithKey f, TraversableWithKey m) => TraversableWithKey (ReaderT f m) 
(Representable f, 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, Semigroup (Key f), Semigroup (Key m)) => Extend (ReaderT f m) 
(Representable f, Representable m) => Representable (ReaderT f m) 

readerT :: Representable f => (Key f -> m b) -> ReaderT f m bSource

runReaderT :: Indexable f => ReaderT f m b -> Key f -> m bSource

ask :: MonadReader r m => m r

Retrieves the monad environment.



:: 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.