Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Fold s a = forall p. IsFold p => Optic' p s a
- class (IsOptionalFold p, IsTraversal p) => IsFold p
- folded :: Foldable f => Fold (f a) a
- unfolded :: (s -> Maybe (a, s)) -> Fold s a
- folding :: Foldable f => (s -> f a) -> Fold s a
- foldring :: (forall f. Applicative f => (a -> f u -> f u) -> f v -> s -> f w) -> Fold s a
- ignored :: Fold s a
- backwards :: Fold s a -> Fold s a
- has :: Fold s a -> s -> Bool
- hasn't :: Fold s a -> s -> Bool
- foldMapOf :: Monoid m => Fold s a -> (a -> m) -> s -> m
- foldMapByOf :: Fold s a -> (r -> r -> r) -> r -> (a -> r) -> s -> r
- foldrOf :: Fold s a -> (a -> r -> r) -> r -> s -> r
- foldlOf' :: Fold s a -> (r -> a -> r) -> r -> s -> r
- foldOf :: Monoid a => Fold s a -> s -> a
- sequenceOf_ :: Applicative f => Fold s (f a) -> s -> f ()
- traverseOf_ :: Applicative f => Fold s a -> (a -> f r) -> s -> f ()
- forOf_ :: Applicative f => Fold s a -> s -> (a -> f r) -> f ()
- toListOf :: Fold s a -> s -> [a]
- anyOf :: Fold s a -> (a -> Bool) -> s -> Bool
- allOf :: Fold s a -> (a -> Bool) -> s -> Bool
- nullOf :: Fold s a -> s -> Bool
- previews :: Fold s a -> (a -> r) -> s -> Maybe r
- preview :: Fold s a -> s -> Maybe a
- (^?) :: s -> Fold s a -> Maybe a
- newtype Failover s a = Failover {
- getFailover :: Fold s a
- newtype Union s a = Union {}
Folds
class (IsOptionalFold p, IsTraversal p) => IsFold p Source #
Instances
Monoid r => IsFold (Forget r :: Type -> Type -> TYPE LiftedRep) Source # | |
Defined in Fresnel.Fold | |
(Applicative f, Traversable f, Contravariant f) => IsFold (Star f) Source # | |
Defined in Fresnel.Fold |
Construction
Elimination
foldMapByOf :: Fold s a -> (r -> r -> r) -> r -> (a -> r) -> s -> r Source #
sequenceOf_ :: Applicative f => Fold s (f a) -> s -> f () Source #
traverseOf_ :: Applicative f => Fold s a -> (a -> f r) -> s -> f () Source #
Failover | |
|