data-lens-2.10.0: Haskell 98 Lenses

Safe HaskellSafe-Infered

Data.Lens.Partial.Lazy

Contents

Synopsis

Documentation

maybeZero :: MonadPlus m => Maybe a -> m a

joinMaybe :: MonadPlus m => m (Maybe a) -> m a

State actions

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

get the value of a partial lens into state

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

returns mzero in case of a null reference

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

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)

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)

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, Num b) => PartialLens a b -> b -> StateT a m (Maybe b)

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