Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class Monad m => MonadReader tag r m | m tag -> r where
- asks :: MonadReader tag r m => proxy tag -> (r -> a) -> m a
Documentation
class Monad m => MonadReader tag r m | m tag -> r where Source
See MonadReader
.
ask :: proxy tag -> m r Source
Retrieves the monad environment.
:: proxy tag | |
-> (r -> r) | The function to modify the environment. |
-> m a |
|
-> m a |
Executes a computation in a modified environment.
:: proxy tag | |
-> (r -> a) | The selector function to apply to the environment. |
-> m a |
Retrieves a function of the current environment.
(LiftLocal t, Monad (t m), MonadReader k tag r m) => MonadReader k tag r (t m) Source | |
(Monad m, (~) * r r') => MonadReader k tag r (ReaderT k tag r' m) Source |
:: MonadReader tag r m | |
=> proxy tag | |
-> (r -> a) | The selector function to apply to the environment. |
-> m a |
Retrieves a function of the current environment.