Module

Data.Lens.Setter

This module defines functions for working with setters.

#(%~)

Operator alias for Data.Lens.Setter.over (right-associative / precedence 4)

#over

over :: forall s t a b. Setter s t a b -> (a -> b) -> s -> t

Apply a function to the foci of a Setter.

#iover

iover :: forall i s t a b. 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.

#(.~)

Operator alias for Data.Lens.Setter.set (right-associative / precedence 4)

#set

set :: forall s t a b. Setter s t a b -> b -> s -> t

Set the foci of a Setter to a constant value.

#(+~)

Operator alias for Data.Lens.Setter.addOver (right-associative / precedence 4)

#addOver

addOver :: forall s t a. Semiring a => Setter s t a a -> a -> s -> t

#(-~)

Operator alias for Data.Lens.Setter.subOver (right-associative / precedence 4)

#subOver

subOver :: forall s t a. Ring a => Setter s t a a -> a -> s -> t

#(*~)

Operator alias for Data.Lens.Setter.mulOver (right-associative / precedence 4)

#mulOver

mulOver :: forall s t a. Semiring a => Setter s t a a -> a -> s -> t

#(//~)

Operator alias for Data.Lens.Setter.divOver (right-associative / precedence 4)

#divOver

divOver :: forall s t a. EuclideanRing a => Setter s t a a -> a -> s -> t

#(||~)

Operator alias for Data.Lens.Setter.disjOver (right-associative / precedence 4)

#disjOver

disjOver :: forall s t a. HeytingAlgebra a => Setter s t a a -> a -> s -> t

#(&&~)

Operator alias for Data.Lens.Setter.conjOver (right-associative / precedence 4)

#conjOver

conjOver :: forall s t a. HeytingAlgebra a => Setter s t a a -> a -> s -> t

#(<>~)

Operator alias for Data.Lens.Setter.appendOver (right-associative / precedence 4)

#appendOver

appendOver :: forall s t a. Semigroup a => Setter s t a a -> a -> s -> t

#(?~)

Operator alias for Data.Lens.Setter.setJust (right-associative / precedence 4)

#setJust

setJust :: forall s t a b. Setter s t a (Maybe b) -> b -> s -> t

#(.=)

Operator alias for Data.Lens.Setter.assign (non-associative / precedence 4)

#assign

assign :: forall s a b m. 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.

#(%=)

Operator alias for Data.Lens.Setter.modifying (non-associative / precedence 4)

#modifying

modifying :: forall s a b m. MonadState s m => Setter s s a b -> (a -> b) -> m Unit

Modify the foci of a Setter in a monadic state.

#(+=)

Operator alias for Data.Lens.Setter.addModifying (non-associative / precedence 4)

#addModifying

addModifying :: forall s a m. MonadState s m => Semiring a => Setter' s a -> a -> m Unit

#(*=)

Operator alias for Data.Lens.Setter.mulModifying (non-associative / precedence 4)

#mulModifying

mulModifying :: forall s a m. MonadState s m => Semiring a => Setter' s a -> a -> m Unit

#(-=)

Operator alias for Data.Lens.Setter.subModifying (non-associative / precedence 4)

#subModifying

subModifying :: forall s a m. MonadState s m => Ring a => Setter' s a -> a -> m Unit

#(//=)

Operator alias for Data.Lens.Setter.divModifying (non-associative / precedence 4)

#divModifying

divModifying :: forall s a m. MonadState s m => EuclideanRing a => Setter' s a -> a -> m Unit

#(||=)

Operator alias for Data.Lens.Setter.disjModifying (non-associative / precedence 4)

#disjModifying

disjModifying :: forall s a m. MonadState s m => HeytingAlgebra a => Setter' s a -> a -> m Unit

#(&&=)

Operator alias for Data.Lens.Setter.conjModifying (non-associative / precedence 4)

#conjModifying

conjModifying :: forall s a m. MonadState s m => HeytingAlgebra a => Setter' s a -> a -> m Unit

#(<>=)

Operator alias for Data.Lens.Setter.appendModifying (non-associative / precedence 4)

#appendModifying

appendModifying :: forall s a m. MonadState s m => Semigroup a => Setter' s a -> a -> m Unit

#(?=)

Operator alias for Data.Lens.Setter.assignJust (non-associative / precedence 4)

#assignJust

assignJust :: forall s a b m. MonadState s m => Setter s s a (Maybe b) -> b -> m Unit

Re-exports from Data.Lens.Types

#Setter'

type Setter' s a = Setter s s a a

#Setter

type Setter s t a b = Optic Function s t a b

A setter.

#IndexedSetter

type IndexedSetter i s t a b = IndexedOptic Function i s t a b

An indexed setter.

#Indexed

newtype Indexed p i s t

Constructors

Instances

Modules