Module

Data.Lens.Setter

Package
purescript-profunctor-lenses
Repository
purescript-contrib/purescript-profunctor-lenses

This module defines functions for working with setters.

#(%~) Source

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

#(.~) Source

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

#(+~) Source

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

#(-~) Source

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

#(*~) Source

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

#(//~) Source

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

#(||~) Source

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

#(&&~) Source

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

#(<>~) Source

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

#(++~) Source

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

#(?~) Source

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

#(.=) Source

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

#(%=) Source

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

#(+=) Source

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

#(*=) Source

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

#(-=) Source

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

#(//=) Source

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

#(||=) Source

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

#(&&=) Source

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

#(<>=) Source

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

#(++=) Source

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

#(?=) Source

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

#over Source

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

Apply a function to the foci of a Setter.

#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.

#set Source

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

Set the foci of a Setter to a constant value.

#addOver Source

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

#mulOver Source

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

#subOver Source

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

#divOver Source

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

#disjOver Source

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

#conjOver Source

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

#appendOver Source

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

#setJust Source

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

#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.

#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.

#addModifying Source

addModifying :: forall m a s. MonadState s m => Semiring 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

#subModifying Source

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

#divModifying Source

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

#disjModifying Source

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

#conjModifying Source

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

#appendModifying Source

appendModifying :: forall m a s. MonadState s m => Semigroup 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

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 p i s t

Profunctor used for IndexedOptics.

Constructors

Instances