Module

Data.Lens.AffineTraversal

This module defines functions for working with affine traversals. An AffineTraversal is a Traversal that applies to at most one element.

These arise most frequently as the composition of a Lens with a Prism.

#affineTraversal

affineTraversal :: forall s t a b. (s -> b -> t) -> (s -> Either t a) -> AffineTraversal s t a b

#affineTraversal'

affineTraversal' :: forall s t a b. (s -> Tuple (b -> t) (Either t a)) -> AffineTraversal s t a b

#withAffineTraversal

withAffineTraversal :: forall s t a b r. AnAffineTraversal s t a b -> ((s -> b -> t) -> (s -> Either t a) -> r) -> r

#cloneAffineTraversal

cloneAffineTraversal :: forall s t a b. AnAffineTraversal s t a b -> AffineTraversal s t a b

Re-exports from Data.Lens.Types

#AnAffineTraversal'

#AnAffineTraversal

type AnAffineTraversal s t a b = Optic (Stall a b) s t a b

#AffineTraversal'

#AffineTraversal

type AffineTraversal s t a b = forall p. Strong p => Choice p => Optic p s t a b

An affine traversal (has at most one focus, but is not a prism).

Modules