- getM :: MonadState s m => (s :-> b) -> m b
- setM :: MonadState s m => (s :-> b) -> b -> m ()
- modM :: MonadState s m => (s :-> b) -> (b -> b) -> m ()
- (=:) :: MonadState s m => (s :-> b) -> b -> m ()
- askM :: MonadReader r m => (r :-> b) -> m b
- localM :: MonadReader r m => (r :-> b) -> (b -> b) -> m a -> m a

# Monadic lens operations.

getM :: MonadState s m => (s :-> b) -> m bSource

Get a value out of state pointed to by the specified lens.

setM :: MonadState s m => (s :-> b) -> b -> m ()Source

Set a value somewhere in state pointed to by the specified lens.

modM :: MonadState s m => (s :-> b) -> (b -> b) -> m ()Source

Modify a value with a function somewhere in state pointed to by the specified lens.

askM :: MonadReader r m => (r :-> b) -> m bSource

Fetch a value pointed to by a lens out of a reader environment.

localM :: MonadReader r m => (r :-> b) -> (b -> b) -> m a -> m aSource

Execute a computation in a modified environment. The lens is used to point out the part to modify.