Data.Lens
- Package
- purescript-profunctor-lenses
- Repository
- purescript-contrib/purescript-profunctor-lenses
This module re-exports types and functions from other modules:
module Data.Lens.Iso
module Data.Lens.Lens
module Data.Lens.Prism
module Data.Lens.Traversal
module Data.Lens.Types
module Data.Lens.Setter
module Data.Lens.Getter
module Data.Lens.Fold
module Data.Lens.Common
Re-exports from Data.Lens.Common
Re-exports from Data.Lens.Fold
#toListOfOn Source
toListOfOn :: forall b a t s. s -> Fold (Endo (List a)) s t a b -> List a
Synonym for toListOf
, reversed.
#sequenceOf_ Source
sequenceOf_ :: forall b a t s f. Applicative f => Fold (Endo (f Unit)) s t (f a) b -> s -> f Unit
Sequence the foci of a Fold
, pulling out an Applicative
, and ignore
the result. If you need the result, see sequenceOf
for Traversal
s.
#replicated Source
replicated :: forall r t b a. Monoid r => Int -> Fold r a b a t
Replicates the elements of a fold.
#productOf Source
productOf :: forall b a t s. Semiring a => Fold (Multiplicative a) s t a b -> s -> a
The product of all foci of a Fold
.
#orOf Source
orOf :: forall b a t s. HeytingAlgebra a => Fold (Disj a) s t a b -> s -> a
The disjunction of all foci of a Fold
.
#itraverseOf_ Source
itraverseOf_ :: forall r b a t s f i. Applicative f => IndexedFold (Endo (f Unit)) i s t a b -> (i -> a -> f r) -> s -> f Unit
Traverse the foci of an IndexedFold
, discarding the results.
#ifoldrOf Source
ifoldrOf :: forall r b a t s i. IndexedFold (Endo r) i s t a b -> (i -> a -> r -> r) -> r -> s -> r
Right fold over an IndexedFold
.
#ifoldlOf Source
ifoldlOf :: forall r b a t s i. IndexedFold (Dual (Endo r)) i s t a b -> (i -> r -> a -> r) -> r -> s -> r
Left fold over an IndexedFold
.
#ifoldMapOf Source
ifoldMapOf :: forall b a t s i r. IndexedFold r i s t a b -> (i -> a -> r) -> s -> r
Fold map over an IndexedFold
.
#ianyOf Source
ianyOf :: forall r b a t s i. HeytingAlgebra r => IndexedFold (Disj r) i s t a b -> (i -> a -> r) -> s -> r
Whether any focus of an IndexedFold
satisfies a predicate.
#iallOf Source
iallOf :: forall r b a t s i. HeytingAlgebra r => IndexedFold (Conj r) i s t a b -> (i -> a -> r) -> s -> r
Whether all foci of an IndexedFold
satisfy a predicate.
#hasn't Source
hasn't :: forall r b a t s. HeytingAlgebra r => Fold (Conj r) s t a b -> s -> r
Determines whether a Fold
does not have a focus.
#has Source
has :: forall r b a t s. HeytingAlgebra r => Fold (Disj r) s t a b -> s -> r
Determines whether a Fold
has at least one focus.
#anyOf Source
anyOf :: forall r b a t s. HeytingAlgebra r => Fold (Disj r) s t a b -> (a -> r) -> s -> r
Whether any focus of a Fold
satisfies a predicate.
#andOf Source
andOf :: forall b a t s. HeytingAlgebra a => Fold (Conj a) s t a b -> s -> a
The conjunction of all foci of a Fold
.
#allOf Source
allOf :: forall r b a t s. HeytingAlgebra r => Fold (Conj r) s t a b -> (a -> r) -> s -> r
Whether all foci of a Fold
satisfy a predicate.
Re-exports from Data.Lens.Getter
#use Source
use :: forall m b a t s. MonadState s m => Getter s t a b -> m a
View the focus of a Getter
in the state of a monad.
#iview Source
iview :: forall b a t s i. IndexedFold (Tuple i a) i s t a b -> s -> Tuple i a
View the focus of a Getter
and its index.
#iuse Source
iuse :: forall m b a t s i. MonadState s m => IndexedFold (Tuple i a) i s t a b -> m (Tuple i a)
View the focus of a Getter
and its index in the state of a monad.
Re-exports from Data.Lens.Iso
#auf Source
auf :: forall p r e b a t s. Profunctor p => AnIso s t a b -> (p r a -> e -> b) -> p r s -> e -> t
Re-exports from Data.Lens.Lens
Re-exports from Data.Lens.Prism
#isn't Source
isn't :: forall r b a t s. HeytingAlgebra r => APrism s t a b -> s -> r
#is Source
is :: forall r b a t s. HeytingAlgebra r => APrism s t a b -> s -> r
#clonePrism Source
clonePrism :: forall b a t s. APrism s t a b -> Prism s t a b
Re-exports from Data.Lens.Setter
#subModifying Source
subModifying :: forall m a s. MonadState s m => Ring a => Setter' s a -> a -> m Unit
#mulModifying Source
mulModifying :: forall m a s. MonadState s m => Semiring a => Setter' s a -> a -> m Unit
#modifying Source
modifying :: forall m b a s. MonadState s m => Setter s s a b -> (a -> b) -> m Unit
Modify the foci of a Setter
in a monadic state.
#iover Source
iover :: forall b a t s i. IndexedSetter i s t a b -> (i -> a -> b) -> s -> t
Apply a function to the foci of a Setter
that may vary with the index.
#divOver Source
divOver :: forall a t s. EuclideanRing a => Setter s t a a -> a -> s -> t
#divModifying Source
divModifying :: forall m a s. MonadState s m => EuclideanRing a => Setter' s a -> a -> m Unit
#disjOver Source
disjOver :: forall a t s. HeytingAlgebra a => Setter s t a a -> a -> s -> t
#disjModifying Source
disjModifying :: forall m a s. MonadState s m => HeytingAlgebra a => Setter' s a -> a -> m Unit
#conjOver Source
conjOver :: forall a t s. HeytingAlgebra a => Setter s t a a -> a -> s -> t
#conjModifying Source
conjModifying :: forall m a s. MonadState s m => HeytingAlgebra a => Setter' s a -> a -> m Unit
#assignJust Source
assignJust :: forall m b a s. MonadState s m => Setter s s a (Maybe b) -> b -> m Unit
#assign Source
assign :: forall m b a s. MonadState s m => Setter s s a b -> b -> m Unit
Set the foci of a Setter
in a monadic state to a constant value.
#appendOver Source
appendOver :: forall a t s. Semigroup a => Setter s t a a -> a -> s -> t
#appendModifying Source
appendModifying :: forall m a s. MonadState s m => Semigroup a => Setter' s a -> a -> m Unit
#addModifying Source
addModifying :: forall m a s. MonadState s m => Semiring a => Setter' s a -> a -> m Unit
Re-exports from Data.Lens.Traversal
#traversed Source
traversed :: forall b a t. Traversable t => Traversal (t a) (t b) a b
Create a Traversal
which traverses the elements of a Traversable
functor.
#traverseOf Source
traverseOf :: forall b a t s f. Applicative f => Optic (Star f) s t a b -> (a -> f b) -> s -> f t
Turn a pure profunctor Traversal
into a lens
-like Traversal
.
#sequenceOf Source
sequenceOf :: forall a t s f. Applicative f => Optic (Star f) s t (f a) a -> s -> f t
Sequence the foci of a Traversal
, pulling out an Applicative
effect.
If you do not need the result, see sequenceOf_
for Fold
s.
#itraverseOf Source
itraverseOf :: forall b a t s i f. Applicative f => IndexedOptic (Star f) i s t a b -> (i -> a -> f b) -> s -> f t
Turn a pure profunctor IndexedTraversal
into a lens
-like IndexedTraversal
.
#elementsOf Source
elementsOf :: forall a t s i p. Wander p => IndexedTraversal i s t a a -> (i -> Boolean) -> IndexedOptic p i s t a a
Traverse elements of an IndexedTraversal
whose index satisfy a predicate.
Re-exports from Data.Lens.Types
#Traversal' Source
type Traversal' s a = Traversal s s a a
#Iso Source
type Iso s t a b = forall p. Profunctor p => Optic p s t a b
A generalized isomorphism.
#IndexedTraversal' Source
type IndexedTraversal' i s a = IndexedTraversal i s s a a
#IndexedTraversal Source
type IndexedTraversal i s t a b = forall p. Wander p => IndexedOptic p i s t a b
An indexed traversal.
#IndexedSetter' Source
type IndexedSetter' i s a = IndexedSetter i s s a a
#IndexedSetter Source
type IndexedSetter i s t a b = IndexedOptic Function i s t a b
An indexed setter.
#IndexedOptic' Source
type IndexedOptic' p i s a = IndexedOptic p i s s a a
#IndexedOptic Source
type IndexedOptic p i s t a b = Indexed p i a b -> p s t
An indexed optic.
#IndexedGetter' Source
type IndexedGetter' i s a = IndexedGetter i s s a a
#IndexedGetter Source
type IndexedGetter i s t a b = IndexedFold a i s t a b
An indexed getter.
#IndexedFold' Source
type IndexedFold' r i s a = IndexedFold r i s s a a
#IndexedFold Source
type IndexedFold r i s t a b = IndexedOptic (Forget r) i s t a b
An indexed fold.
#Forget Source
- Modules
- Data.
Lens - Data.
Lens. At - Data.
Lens. Common - Data.
Lens. Fold - Data.
Lens. Fold. Partial - Data.
Lens. Getter - Data.
Lens. Index - Data.
Lens. Indexed - Data.
Lens. Internal. Exchange - Data.
Lens. Internal. Focusing - Data.
Lens. Internal. Forget - Data.
Lens. Internal. Indexed - Data.
Lens. Internal. Market - Data.
Lens. Internal. Re - Data.
Lens. Internal. Shop - Data.
Lens. Internal. Tagged - Data.
Lens. Internal. Wander - Data.
Lens. Iso - Data.
Lens. Iso. Newtype - Data.
Lens. Lens - Data.
Lens. Lens. Product - Data.
Lens. Lens. Tuple - Data.
Lens. Lens. Unit - Data.
Lens. Lens. Void - Data.
Lens. Prism - Data.
Lens. Prism. Coproduct - Data.
Lens. Prism. Either - Data.
Lens. Prism. Maybe - Data.
Lens. Setter - Data.
Lens. Traversal - Data.
Lens. Types - Data.
Lens. Zoom