mtl-unleashed-0.2.2: MTL classes without the functional dependency

Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Readers

Description

MonadState without the function dependency m -> s.

Synopsis

Documentation

class Monad m => MonadReaders r m where Source

Version of MonadReader modified to remove the functional dependency.

Minimal complete definition

local

Methods

ask :: m r Source

local :: (r -> r) -> m a -> m a Source

Instances

(Monad m, Monoid w, MonadReaders r m) => MonadReaders r (WriterT w m) 
(Monad m, MonadReaders r m) => MonadReaders r (StateT s m) 
Monad m => MonadReaders r (ReaderT r m) 

asks Source

Arguments

:: MonadReaders r m 
=> (r -> a)

The selector function to apply to the environment.

-> m a 

Retrieves a function of the current environment.