Safe Haskell | None |
---|

- type Lens a b = a :-> b
- lens :: (f -> a) -> ((a -> a) -> f -> f) -> (:->) f a
- (#) :: Lens a b -> Lens b c -> Lens a c
- (#$) :: Lens f a -> f -> a
- (#=) :: Lens f a -> a -> f -> f
- (%=) :: Lens f a -> (a -> a) -> f -> f
- (<#>) :: Functor f => Lens a b -> f a -> f b
- map :: Ord k => k -> Lens (Map k a) (Maybe a)
- set :: Ord k => k -> Lens (Set k) Bool
- list :: Int -> Lens [a] (Maybe a)

# Documentation

:: (f -> a) | Getter. |

-> ((a -> a) -> f -> f) | Modifier. |

-> (:->) f a |

Create a total lens from a getter and a modifier.

We expect the following law to hold:

get l (modify l m f) == m (get l f)