Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Traversal s t a b = forall p. IsTraversal p => Optic p s t a b
- type Traversal' s a = Traversal s s a a
- class (IsOptional p, Traversing p) => IsTraversal p
- traversed :: Traversable t => Traversal (t a) (t b) a b
- backwards :: Traversal s t a b -> Traversal s t a b
- traverseOf :: Applicative f => Traversal s t a b -> (a -> f b) -> s -> f t
- forOf :: Applicative f => Traversal s t a b -> s -> (a -> f b) -> f t
- sequenceOf :: Applicative f => Traversal s t (f b) b -> s -> f t
- transposeOf :: Traversal s t [a] a -> s -> [t]
- mapAccumLOf :: Traversal s t a b -> (accum -> a -> (b, accum)) -> accum -> s -> (t, accum)
- mapAccumROf :: Traversal s t a b -> (accum -> a -> (b, accum)) -> accum -> s -> (t, accum)
- scanl1Of :: Traversal s t a a -> (a -> a -> a) -> s -> t
- scanr1Of :: Traversal s t a a -> (a -> a -> a) -> s -> t
Traversals
type Traversal s t a b = forall p. IsTraversal p => Optic p s t a b Source #
type Traversal' s a = Traversal s s a a Source #
class (IsOptional p, Traversing p) => IsTraversal p Source #
Instances
Monad m => IsTraversal (Kleisli m) Source # | |
Defined in Fresnel.Traversal.Internal | |
Monoid r => IsTraversal (Forget r :: Type -> Type -> TYPE LiftedRep) Source # | |
Defined in Fresnel.Traversal.Internal | |
Applicative f => IsTraversal (Star f) Source # | |
Defined in Fresnel.Traversal.Internal | |
IsTraversal (->) Source # | |
Defined in Fresnel.Traversal.Internal |
Construction
Elimination
traverseOf :: Applicative f => Traversal s t a b -> (a -> f b) -> s -> f t Source #
sequenceOf :: Applicative f => Traversal s t (f b) b -> s -> f t Source #
transposeOf :: Traversal s t [a] a -> s -> [t] Source #
mapAccumLOf :: Traversal s t a b -> (accum -> a -> (b, accum)) -> accum -> s -> (t, accum) Source #
mapAccumROf :: Traversal s t a b -> (accum -> a -> (b, accum)) -> accum -> s -> (t, accum) Source #