data-lens-2.10.6: Used to be Haskell 98 Lenses

Safe HaskellSafe-Inferred
LanguageHaskell98

Data.Lens.Partial.Lazy

Contents

Synopsis

Documentation

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

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

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

(*=) :: (Monad m, Num b) => PartialLens a b -> b -> StateT a m (Maybe b) infixr 4 Source

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

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

(&&=) :: Monad m => PartialLens a Bool -> Bool -> StateT a m (Maybe Bool) infixr 4 Source

(||=) :: Monad m => PartialLens a Bool -> Bool -> StateT a m (Maybe Bool) infixr 4 Source