Safe Haskell | Safe |
---|---|

Language | Haskell98 |

- maybeZero :: MonadPlus m => Maybe a -> m a
- joinMaybe :: MonadPlus m => m (Maybe a) -> m a
- access :: Monad m => PartialLens a b -> StateT a m (Maybe b)
- accessPlus :: MonadPlus m => PartialLens a b -> StateT a m b
- (~=) :: Monad m => PartialLens a b -> b -> StateT a m (Maybe b)
- (%=) :: Monad m => PartialLens a b -> (b -> b) -> StateT a m (Maybe b)
- (%%=) :: Monad m => PartialLens a b -> (b -> (c, b)) -> StateT a m (Maybe c)
- (+=) :: (Monad m, Num b) => PartialLens a b -> b -> StateT a m (Maybe b)
- (-=) :: (Monad m, Num b) => PartialLens a b -> b -> StateT a m (Maybe b)
- (*=) :: (Monad m, Num b) => PartialLens a b -> b -> StateT a m (Maybe b)
- (//=) :: (Monad m, Fractional b) => PartialLens a b -> b -> StateT a m (Maybe b)
- (&&=) :: Monad m => PartialLens a Bool -> Bool -> StateT a m (Maybe Bool)
- (||=) :: Monad m => PartialLens a Bool -> Bool -> StateT a m (Maybe Bool)

# Documentation

# State actions

access :: Monad m => PartialLens a b -> StateT a m (Maybe b) Source #

get the value of a partial lens into state

accessPlus :: MonadPlus m => PartialLens a b -> StateT a m b Source #

returns mzero in case of a null reference

(~=) :: Monad m => PartialLens a b -> b -> StateT a m (Maybe b) Source #

set a value using a partial lens into state
returns `Nothing`

in case of a null reference

(%=) :: Monad m => PartialLens a b -> (b -> b) -> StateT a m (Maybe b) Source #

infix modification a value through a partial lens into state
returns `Nothing`

in case of a null reference

(%%=) :: Monad m => PartialLens a b -> (b -> (c, b)) -> StateT a m (Maybe c) Source #

infix modification of a value through a partial lens into state
with a supplemental response.
returns `Nothing`

in case of a null reference

(//=) :: (Monad m, Fractional b) => PartialLens a b -> b -> StateT a m (Maybe b) infixr 4 Source #