Idris2Doc : Monocle.Setter

Monocle.Setter

(source)

Definitions

record Setter : Type -> Type -> Type -> Type -> Type
  A Setter allows us to update zero or more values in a
larger data type.

Possible examples include updating single record fields, mapping
a function over the values in a `List` (or any other `Functor`),
or converting the characters in a string.

A Setter is parameterized over four parameters, because in general
we could not only update a value but also its type with an updating
function. Consider Setter `io`, where `s` corresponds to `IO a` and
`t` corresponds to `IO b`. Accordingly, if we have a function from
`a` to `b`, we can convert an `IO a` to an `IO b`.

Totality: total
Visibility: public export
Constructor: 
S : ((a -> b) -> s -> t) -> Setter s t a b

Projection: 
.over_ : Setter s t a b -> (a -> b) -> s -> t

Hints:
OSeq Iso Setter Setter
OSeq Lens Setter Setter
OSeq Prism Setter Setter
OSeq Optional Setter Setter
OSeq Traversal Setter Setter
OSeq Setter Setter Setter
OSeq Setter Iso Setter
OSeq Setter Lens Setter
OSeq Setter Prism Setter
OSeq Setter Optional Setter
OSeq Setter Traversal Setter
ToSetter Setter
.over_ : Setter s t a b -> (a -> b) -> s -> t
Totality: total
Visibility: public export
over_ : Setter s t a b -> (a -> b) -> s -> t
Totality: total
Visibility: public export
0 Setter' : Type -> Type -> Type
  Convenience alias for monomorphic setters, which do not allow
us to change the value and source types.

Totality: total
Visibility: public export
interface ToSetter : (Type -> Type -> Type -> Type -> Type) -> Type
  Interface for converting other optics to setters. With the exception
of Fold and Getter, all optics in this library have an implementation
of `ToSetter`.

Parameters: o
Methods:
toSetter : o s t a b -> Setter s t a b

Implementations:
ToSetter Iso
ToSetter Lens
ToSetter Optional
ToSetter Prism
ToSetter Setter
ToSetter Traversal
toSetter : ToSetter o => o s t a b -> Setter s t a b
Totality: total
Visibility: public export
over : ToSetter o => o s t a b -> (a -> b) -> s -> t
  Use a Setter to update the data stored in a source value.

Totality: total
Visibility: public export
set : ToSetter o => o s t a b -> b -> s -> t
  Use a Setter to set the data stored in a source value.

Totality: total
Visibility: public export
(~>) : Setter s t a b -> Setter a b c d -> Setter s t c d
  Sequential composition of setters.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 0
map_ : Functor f => Setter (f a) (f b) a b
  Every `Functor` gives rise to a polymorphic Setter via `map`.

Totality: total
Visibility: public export
contramap_ : Contravariant f => Setter (f a) (f b) b a
  Every contravariant functor gives rise to a polymorphic Setter via
`contramap`.

Totality: total
Visibility: public export
overST : Monad m => ToSetter o => o s s a a -> (a -> a) -> StateT s m ()
  Modify the current state with a setter

Totality: total
Visibility: export
setST : Monad m => ToSetter o => o s s a a -> a -> StateT s m ()
  Modify the current state with a setter

Totality: total
Visibility: export