| Safe Haskell | Safe-Inferred |
|---|
Data.Label.Total
Description
Default lenses for simple total getters and monomorphic updates. Useful for creating accessor labels for single constructor datatypes. Also useful field labels that are shared between all the constructors of a multi constructor datatypes.
Documentation
Arguments
| :: (f -> o) | Getter. |
| -> ((o -> i) -> f -> g) | Modifier. |
| -> (f -> g) :-> (o -> i) |
Create a total lens from a getter and a modifier.
We expect the following law to hold:
get l (set l a f) == a
set l (get l f) f == f