Data.Lens.Lazy

data-lens-2.0.2: Haskell 98 Lenses

Data.Lens.Lazy

Contents

- State API

Synopsis

- module Data.Lens.Common
- access :: Monad m => Lens a b -> StateT a m b
- (~=) :: Monad m => Lens a b -> b -> StateT a m b
- (!=) :: Monad m => Lens a b -> b -> StateT a m b
- (%=) :: Monad m => Lens a b -> (b -> b) -> StateT a m b
- (!%=) :: Monad m => Lens a b -> (b -> b) -> StateT a m b
- (%%=) :: Monad m => Lens a b -> (b -> (c, b)) -> StateT a m c
- (!%%=) :: Monad m => Lens a b -> (b -> (c, b)) -> StateT a m c
- (+=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b
- (!+=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b
- (-=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b
- (!-=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b
- (*=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b
- (!*=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b
- (//=) :: (Monad m, Fractional b) => Lens a b -> b -> StateT a m b
- (!/=) :: (Monad m, Fractional b) => Lens a b -> b -> StateT a m b
- (&&=) :: Monad m => Lens a Bool -> Bool -> StateT a m Bool
- (!&&=) :: Monad m => Lens a Bool -> Bool -> StateT a m Bool
- (||=) :: Monad m => Lens a Bool -> Bool -> StateT a m Bool
- (!||=) :: Monad m => Lens a Bool -> Bool -> StateT a m Bool
- focus :: Monad m => Lens a b -> StateT b m c -> StateT a m c

# Documentation

module Data.Lens.Common

# State API

access :: Monad m => Lens a b -> StateT a m b

get the value of a lens into state

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

(!=) :: Monad m => Lens a b -> b -> StateT a m b

set a value using a lens into state

(%=) :: Monad m => Lens a b -> (b -> b) -> StateT a m b

(!%=) :: Monad m => Lens a b -> (b -> b) -> StateT a m b

infix modification a value through a lens into state

(%%=) :: Monad m => Lens a b -> (b -> (c, b)) -> StateT a m c

(!%%=) :: Monad m => Lens a b -> (b -> (c, b)) -> StateT a m c

infix modification of a value through a lens into state with a supplemental response

(+=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b

(!+=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b

(-=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b

(!-=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b

(*=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b

(!*=) :: (Monad m, Num b) => Lens a b -> b -> StateT a m b

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

(!/=) :: (Monad m, Fractional b) => Lens a b -> b -> StateT a m b

(&&=) :: Monad m => Lens a Bool -> Bool -> StateT a m Bool

(!&&=) :: Monad m => Lens a Bool -> Bool -> StateT a m Bool

(||=) :: Monad m => Lens a Bool -> Bool -> StateT a m Bool

(!||=) :: Monad m => Lens a Bool -> Bool -> StateT a m Bool

focus :: Monad m => Lens a b -> StateT b m c -> StateT a m c