Safe Haskell | None |
---|---|
Language | Haskell2010 |
A minimal subset of the "lens" library functionality, which is completely compatible with it.
Unless you use the "lens" library itself, this module is your interface to manipulating the record fields.
Documentation
type Lens s a = forall f. Functor f => (a -> f a) -> s -> f s Source
A reference from a datastructure s
to some part a
,
which can be used to manipulate that particular part.
view :: Lens s a -> s -> a Source
Given a lens to a subpart and a datastructure, produce the value of the referred subpart.