Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- view :: forall r a m sig k is. (Is k A_Getter, Has (Reader r) sig m) => Optic' k is r a -> m a
- views :: forall r a b m sig k is. (Is k A_Getter, Has (Reader r) sig m) => Optic' k is r a -> (a -> b) -> m b
- locally :: (Is k A_Setter, Has (Reader r) sig m) => Optic k is r r a b -> (a -> b) -> m c -> m c
- use :: forall s a m sig k is. (Is k A_Getter, Has (State s) sig m) => Optic' k is s a -> m a
- uses :: forall s a b m sig k is. (Is k A_Getter, Has (State s) sig m) => Optic' k is s a -> (a -> b) -> m b
- preuse :: forall s a m sig k is. (Is k An_AffineFold, Has (State s) sig m) => Optic' k is s a -> m (Maybe a)
- assign :: forall s a b m sig k is. (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> b -> m ()
- modifying :: (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> (a -> b) -> m ()
- (.=) :: forall s a b m sig k is. (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> b -> m ()
- (?=) :: forall s a b m sig k is. (Is k A_Setter, Has (State s) sig m) => Optic k is s s a (Maybe b) -> b -> m ()
- (%=) :: (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> (a -> b) -> m ()

# Reader operations

view :: forall r a m sig k is. (Is k A_Getter, Has (Reader r) sig m) => Optic' k is r a -> m a Source #

views :: forall r a b m sig k is. (Is k A_Getter, Has (Reader r) sig m) => Optic' k is r a -> (a -> b) -> m b Source #

locally :: (Is k A_Setter, Has (Reader r) sig m) => Optic k is r r a b -> (a -> b) -> m c -> m c Source #

# State operations

use :: forall s a m sig k is. (Is k A_Getter, Has (State s) sig m) => Optic' k is s a -> m a Source #

uses :: forall s a b m sig k is. (Is k A_Getter, Has (State s) sig m) => Optic' k is s a -> (a -> b) -> m b Source #

preuse :: forall s a m sig k is. (Is k An_AffineFold, Has (State s) sig m) => Optic' k is s a -> m (Maybe a) Source #

Use the target of a `AffineTraversal`

or `AffineFold`

in the current state.

assign :: forall s a b m sig k is. (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> b -> m () Source #

Replace the target(s) of an Optic in our monadic state with a new value, irrespective of the old. The action and the optic operation are applied strictly.

This is aprefix form of `.=`

.

modifying :: (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> (a -> b) -> m () Source #

Map over the target(s) of an `Optic`

in our monadic state.
The action and the optic operation are applied strictly.

# Infix operators

(.=) :: forall s a b m sig k is. (Is k A_Setter, Has (State s) sig m) => Optic k is s s a b -> b -> m () infix 4 Source #

Replace the target(s) of an Optic in our monadic state with a new value, irrespective of the old. The action and the optic operation are applied strictly.

This is an infix form of `assign`

.