Safe Haskell | Safe-Inferred |
---|
- newtype PartialLens a b = PLens (a -> Maybe (Store b a))
- runPLens :: PartialLens a b -> a -> Coproduct Identity (Store b) a
- null :: PartialLens a b
- totalLens :: Lens a b -> PartialLens a b
- getPL :: PartialLens a b -> a -> Maybe b
- getorPL :: PartialLens a b -> b -> a -> b
- getorAPL :: Applicative f => PartialLens a b -> f b -> a -> f b
- mergePL :: PartialLens a c -> PartialLens b c -> PartialLens (Either a b) c
- nullPL :: PartialLens a b -> a -> Bool
- getorEmptyPL :: Monoid o => PartialLens a b -> (b -> o) -> a -> o
- sumPL :: Num c => PartialLens a b -> (b -> c) -> a -> c
- productPL :: Num c => PartialLens a b -> (b -> c) -> a -> c
- anyPL :: PartialLens a b -> (b -> Bool) -> a -> Bool
- allPL :: PartialLens a b -> (b -> Bool) -> a -> Bool
- trySetPL :: PartialLens a b -> a -> Maybe (b -> a)
- setPL :: PartialLens a b -> b -> a -> a
- modPL :: PartialLens a b -> (b -> b) -> a -> a
- (^$) :: PartialLens a b -> a -> Maybe b
- (^.) :: a -> PartialLens a b -> Maybe b
- (^=) :: PartialLens a b -> b -> a -> a
- (^%=) :: PartialLens a b -> (b -> b) -> a -> a
- (^%%=) :: Applicative f => PartialLens a b -> (b -> f b) -> a -> f a
- (^+=) :: Num b => PartialLens a b -> b -> a -> a
- (^*=) :: Num b => PartialLens a b -> b -> a -> a
- (^-=) :: Num b => PartialLens a b -> b -> a -> a
- (^/=) :: Fractional b => PartialLens a b -> b -> a -> a
- justLens :: PartialLens (Maybe a) a
- leftLens :: PartialLens (Either a b) a
- rightLens :: PartialLens (Either a b) b
- headLens :: PartialLens [a] a
- tailLens :: PartialLens [a] [a]
Documentation
newtype PartialLens a b Source
null :: PartialLens a bSource
totalLens :: Lens a b -> PartialLens a bSource
Functional API
getPL :: PartialLens a b -> a -> Maybe bSource
getorPL :: PartialLens a b -> b -> a -> bSource
getorAPL :: Applicative f => PartialLens a b -> f b -> a -> f bSource
mergePL :: PartialLens a c -> PartialLens b c -> PartialLens (Either a b) cSource
nullPL :: PartialLens a b -> a -> BoolSource
getorEmptyPL :: Monoid o => PartialLens a b -> (b -> o) -> a -> oSource
sumPL :: Num c => PartialLens a b -> (b -> c) -> a -> cSource
productPL :: Num c => PartialLens a b -> (b -> c) -> a -> cSource
anyPL :: PartialLens a b -> (b -> Bool) -> a -> BoolSource
allPL :: PartialLens a b -> (b -> Bool) -> a -> BoolSource
trySetPL :: PartialLens a b -> a -> Maybe (b -> a)Source
setPL :: PartialLens a b -> b -> a -> aSource
modPL :: PartialLens a b -> (b -> b) -> a -> aSource
Operator API
(^$) :: PartialLens a b -> a -> Maybe bSource
(^.) :: a -> PartialLens a b -> Maybe bSource
(^=) :: PartialLens a b -> b -> a -> aSource
(^%=) :: PartialLens a b -> (b -> b) -> a -> aSource
(^%%=) :: Applicative f => PartialLens a b -> (b -> f b) -> a -> f aSource
applicative modify
Pseudo-imperatives
(^+=) :: Num b => PartialLens a b -> b -> a -> aSource
(^*=) :: Num b => PartialLens a b -> b -> a -> aSource
(^-=) :: Num b => PartialLens a b -> b -> a -> aSource
(^/=) :: Fractional b => PartialLens a b -> b -> a -> aSource
Stock partial lenses
justLens :: PartialLens (Maybe a) aSource
leftLens :: PartialLens (Either a b) aSource
rightLens :: PartialLens (Either a b) bSource
headLens :: PartialLens [a] aSource
tailLens :: PartialLens [a] [a]Source