Idris2Doc : Monocle.Iso

Monocle.Iso

(source)

Definitions

recordIso : Type->Type->Type->Type->Type
  An Iso describes an isomorphism between two types.

Two types are isomorphic, if there is a lossless conversion
from one to the other and vice versa. Examples include the
(monomorphic) isomorphism from `String` to `List Char` and the
(polymorphic) isomorphism from `Either a b` to `Either b a`.

Isomorphisms must obey two identity laws:

`get_ . reverseGet` must be the identity function. The same holds
for `reverseGet . get_`.

Isomorphisms are the most powerful kinds of optics, and they can
be converted to all other optics in this library.

Totality: total
Visibility: public export
Constructor: 
I : (s->a) -> (b->t) ->Isostab

Projections:
.get_ : Isostab->s->a
.reverseGet : Isostab->b->t

Hints:
OSeqIsoIsoIso
OSeqIsoLensLens
OSeqIsoPrismPrism
OSeqIsoOptionalOptional
OSeqIsoTraversalTraversal
OSeqIsoGetterGetter
OSeqIsoSetterSetter
OSeqIsoFoldFold
OSeqLensIsoLens
OSeqPrismIsoPrism
OSeqOptionalIsoOptional
OSeqTraversalIsoTraversal
OSeqSetterIsoSetter
OSeqGetterIsoGetter
OSeqFoldIsoFold
ToFoldIso
ToGetterIso
ToIsoIso
ToLensIso
ToOptionalIso
ToPrismIso
ToSetterIso
ToTraversalIso
.get_ : Isostab->s->a
Totality: total
Visibility: public export
get_ : Isostab->s->a
Totality: total
Visibility: public export
.reverseGet : Isostab->b->t
Totality: total
Visibility: public export
reverseGet : Isostab->b->t
Totality: total
Visibility: public export
0Iso' : Type->Type->Type
  Convenience alias for monomorphic Isos, which do not allow
us to change the value and source types.

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

Parameters: o
Methods:
toIso : ostab->Isostab

Implementation: 
ToIsoIso
toIso : ToIsoo=>ostab->Isostab
Totality: total
Visibility: public export
rev : Isostab->Isobats
  Isomorphisms are symmetric: If `x` is isomorphic to `y` then `y` is
isomorphic to `x`. This function describes this symmetry.

Totality: total
Visibility: public export
(~>) : Isostab->Isoabcd->Isostcd
  Sequential composition of Isos.

This describes the transitivity of isomorphisms: If `x` is isomorphic to
`y` and `y` is isomorhic to `z`, then `x` is isomorphic to `z`.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 0
identity : Iso'aa
  Isomorphisms are reflexive: Every type is trivially isomorphic to itself.

Totality: total
Visibility: export
idL : Lens'aa
  The identity lens, derived from the corresponding isomorphism.

Totality: total
Visibility: export
idP : Prism'aa
  The identity prism, derived from the corresponding isomorphism.

Totality: total
Visibility: export
idO : Optional'aa
  The identity optional, derived from the corresponding isomorphism.

Totality: total
Visibility: export
idT : Traversal'aa
  The identity traversal, derived from the corresponding isomorphism.

Totality: total
Visibility: export
pack : Iso' (ListChar) String
  Isomorphism between `List Char` and `String`.

Totality: total
Visibility: export
unpack : Iso'String (ListChar)
  Isomorphism between `String` and `List Char`.

Totality: total
Visibility: export
chips : Iso (SnocLista) (SnocListb) (Lista) (Listb)
  Isomorphism between `SnocList` and `List`.

Totality: total
Visibility: export
fish : Iso (Lista) (Listb) (SnocLista) (SnocListb)
  Isomorphism between `List` and `SnocList`.

Totality: total
Visibility: export
swap : Iso (a, b) (c, d) (b, a) (d, c)
  Isomorphism between pairs with their values swapped.

Totality: total
Visibility: export
flip : Iso (a->b->c) (d->e->f) (b->a->c) (e->d->f)
  Isomorphism between binary functions with their arguments
swapped.

Totality: total
Visibility: export
uncurry : Iso (a->b->c) (d->e->f) ((a, b) ->c) ((d, e) ->f)
  Isomorphism between binary functions and functions taking
a pair of values as their argument.

Totality: total
Visibility: export
curry : Iso ((a, b) ->c) ((d, e) ->f) (a->b->c) (d->e->f)
  Isomorphism between functions taking a pair as their argument
and binary functions.

Totality: total
Visibility: export
swapE : Iso (Eitherab) (Eithercd) (Eitherba) (Eitherdc)
  Isomorphism between `Either a b` and `Either b a`.

Totality: total
Visibility: export
withDefault : a->Iso' (Maybea) a
  Given a default value of type `a`, we can create an isomorphism between
`Maybe a` and values of type `a`.

This wraps every value of type `a` in a `Just`. In the other direction,
we use `fromMaybe` with the provided default value to extract a value
from a `Nothing`.

Totality: total
Visibility: export
leftVoid : Iso (EitherVoida) (EitherVoidb) ab
  Isomorphism between `Either Void a` and `a`: The `Left` case
is impossible because `Void` is uninhabited.

Totality: total
Visibility: export
rightVoid : Iso (EitheraVoid) (EitherbVoid) ab
  Isomorphism between `Either a Void` and `a`: The `Right` case
is impossible because `Void` is uninhabited.

Totality: total
Visibility: export
any1 : Iso (Anyf [a]) (Anyg [b]) (fa) (gb)
  Isomorphism between a unary sum type and the wrapped value.

Totality: total
Visibility: export