Module

Data.Lens.Setter

Package
profunctor-lenses
Repository
purerl/purescript-profunctor-lenses

This module defines functions for working with setters.

#(%~) Source

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

#over Source

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 Source

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.

#(.~) Source

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

#set Source

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

Set the foci of a Setter to a constant value.

#(+~) Source

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

#addOver Source

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

#(-~) Source

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

#subOver Source

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

#(*~) Source

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

#mulOver Source

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

#(//~) Source

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

#divOver Source

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

#(||~) Source

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

#disjOver Source

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

#(&&~) Source

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

#conjOver Source

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

#(<>~) Source

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

#appendOver Source

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

#(?~) Source

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

#setJust Source

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

#(.=) Source

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

#assign Source

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.

#(%=) Source

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

#modifying Source

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.

#(+=) Source

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

#addModifying Source

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

#(*=) Source

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

#mulModifying Source

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

#(-=) Source

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

#subModifying Source

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

#(//=) Source

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

#divModifying Source

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

#(||=) Source

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

#disjModifying Source

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

#(&&=) Source

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

#conjModifying Source

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

#(<>=) Source

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

#appendModifying Source

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

#(?=) Source

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

#assignJust Source

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' Source

type Setter' s a = Setter s s a a

#Setter Source

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

A setter.

#IndexedSetter Source

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

An indexed setter.

#Indexed Source

newtype Indexed :: (Type -> Type -> Type) -> Type -> Type -> Type -> Typenewtype Indexed p i s t

Profunctor used for IndexedOptics.

Constructors

Instances