GHC.Toolchain.Lens
Description
A very simple Lens implementation
data Lens a b Source #
Constructors
Fields
(%) :: Lens a b -> Lens b c -> Lens a c Source #
over :: Lens a b -> (b -> b) -> a -> a Source #
(%++) :: Lens a [b] -> b -> a -> a Source #
Append b to [b]
b
[b]
Example usage: @ cc & _ccProgram % _prgFlags %++ "-U__i686" @
cc & _ccProgram % _prgFlags %++ "-U__i686"
(&) :: a -> (a -> b) -> b infixl 1 Source #
& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $, which allows & to be nested in $.
&
$
>>> 5 & (+1) & show "6"
>>>
5 & (+1) & show
Since: base-4.8.0.0