Idris2Doc : Monocle.Lens

Monocle.Lens

(source)

Definitions

recordLens : Type->Type->Type->Type->Type
  A Lens unifies a `Setter` and a Getter, and is therefore typically used
to focus on a single value in a larger data type.

Lenses are best known for allowing us to extract and update record fields,
but they can also be used with other types of data.

A Lens is parameterized over four parameters, because in general
we could not only update a value but also its type with an updating
function. Consider Lens `fst`, where `s` corresponds to `(a,c)` and
`t` corresponds to `(b,c)`. Accordingly, if we have a function from
`a` to `b`, we can convert a pair of type `(a,c)` to one of type `(b,c)`.

Totality: total
Visibility: public export
Constructor: 
L : (s->a) -> ((a->b) ->s->t) ->Lensstab

Projections:
.get_ : Lensstab->s->a
.mod_ : Lensstab-> (a->b) ->s->t

Hints:
OSeqIsoLensLens
OSeqLensLensLens
OSeqLensIsoLens
OSeqLensPrismOptional
OSeqLensOptionalOptional
OSeqLensTraversalTraversal
OSeqLensGetterGetter
OSeqLensSetterSetter
OSeqLensFoldFold
OSeqPrismLensOptional
OSeqOptionalLensOptional
OSeqTraversalLensTraversal
OSeqSetterLensSetter
OSeqGetterLensGetter
OSeqFoldLensFold
ToFoldLens
ToGetterLens
ToLensLens
ToOptionalLens
ToSetterLens
ToTraversalLens
.get_ : Lensstab->s->a
Totality: total
Visibility: public export
get_ : Lensstab->s->a
Totality: total
Visibility: public export
.mod_ : Lensstab-> (a->b) ->s->t
Totality: total
Visibility: public export
mod_ : Lensstab-> (a->b) ->s->t
Totality: total
Visibility: public export
0Lens' : Type->Type->Type
  Convenience alias for monomorphic lenses, which do not allow
us to change the value and source types.

Totality: total
Visibility: public export
lens : (s->a) -> (b->s->t) ->Lensstab
  Alternative constructor for creating a Lens from a getting and
a setting function.

Totality: total
Visibility: public export
interfaceToLens : (Type->Type->Type->Type->Type) ->Type
  Interface for converting other optics to lenses.

Parameters: o
Methods:
toLens : ostab->Lensstab

Implementations:
ToLensIso
ToLensLens
toLens : ToLenso=>ostab->Lensstab
Totality: total
Visibility: public export
setL : Lensstab->b->s->t
  Specialized version of `set` that sometimes helps with type inference.

Totality: total
Visibility: public export
modF : Functorf=>Lensstab-> (a->fb) ->s->ft
  Modify the value focussed on by the given Lens with an effectful
computation.

Totality: total
Visibility: public export
(~>) : Lensstxy->Lensxyab->Lensstab
  Sequential composition of lenses.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 0
fst : Lens (a, c) (b, c) ab
  A Lens focussing on the first element of a pair.

Totality: total
Visibility: public export
snd : Lens (c, a) (c, b) ab
  A Lens focussing on the second element of a pair.

Totality: total
Visibility: public export
head : Lens' (Vect (Sn) a) a
  A Lens focussing on the head of a non-empty vector.

Totality: total
Visibility: public export
tail : Lens' (Vect (Sn) a) (Vectna)
  A Lens focussing on the tail of a non-empty vector.

Totality: total
Visibility: public export
ix : Finn->Lens' (Vectna) a
  A Lens focussing on a specific element in a vector.

Totality: total
Visibility: public export
head1 : Lens' (List1a) a
  A Lens focussing on the head of a non-empty list.

Totality: total
Visibility: public export
tail1 : Lens' (List1a) (Lista)
  A Lens focussing on the tail of a non-empty list.

Totality: total
Visibility: public export
at : Ordk=>k->Lens' (SortedMapkv) (Maybev)
  A Lens focussing on the value associated with the given
key in a `SortedMap`.

Note: Unlike a related `Optional`, which we get via `at k .> just`,
this Lens allows us to remove a key from a dictionary by
setting the corresponding value to `Nothing`.

Totality: total
Visibility: public export
atDflt : Ordk=>k->v->Lens' (SortedMapkv) v
  Like `at` but yields the given default value in case no
value has been associated with the given key.

Totality: total
Visibility: export
atAuto : Ordk=>k->v=>Lens' (SortedMapkv) v
  Like `atDflt` but using an auto-implicit argument for the default
value.

Totality: total
Visibility: export
allGet : Elemtks=>Allfks->ft
Totality: total
Visibility: public export
allUpd : Elemtks=> (ft->ft) ->Allfks->Allfks
Totality: total
Visibility: public export
prod : (0t : k) ->Elemtks=>Lens' (Allfks) (ft)
  Lens focussing on a single element in a heterogeneous list.

Totality: total
Visibility: public export
allHead : Lens' (Allf (k::ks)) (fk)
Totality: total
Visibility: public export
allTail : Lens' (Allf (k::ks)) (Allfks)
Totality: total
Visibility: public export
stL : Functorm=>Lens'ts->StateTsmx->StateTtmx
  View a state through a lens

Totality: total
Visibility: export