Modify a part of the state monadically, and return some result.
ModuleAgda-2.8.0.2Haskell2010
Agda.Utils.Lens
A cut-down implementation of lenses, with names taken from Edward Kmett's lens package.
- 4 types
- 21 values
- PackageAgda-2.8.0.2
- Exports26
- LanguageHaskell2010
- LicenceMIT
- SourceLens.hs
Modify a part of the state.
Modify a part of the state monadically.
Write a part of the state.
Get inner part i of structure o as designated by Lens' o i.
Focus on given element in a set.
Focus on a part of the state for a stateful computation.
Build a lens out of an isomorphism.
Access a map value at a given key.
Build a lens from a getter and a setter.
Only sound if the lenses are disjoint!
Modify a part of the state in a subcomputation.
Modify a part of the state locally.
Modify inner part i of structure o using a function i -> i.
Set inner part i of structure o as designated by Lens' o i.
Read a part of the state.
Ask for part of read-only state.
Van Laarhoven style homogeneous lenses. Mnemoic: "Lens outer inner", same type argument order as 'get :: o -> i'.
Fanout: send the input to both argument arrows and combine their output.
The default definition may be overridden with a more efficient version if desired.
╭───────╮ c
b │ ┌─ f ─┼───>
>───┼─┤ │
│ └─ g ─┼───>
╰───────╯ c'