lenz-0.2.1.0: Van Laarhoven lenses

Safe HaskellSafe
LanguageHaskell98

Control.Lens

Documentation

type Lens α β a b = Refractor ((~) (->)) Functor α β a b Source #

type Refractor c d α β a b = forall p f. (d f, c p) => p a (f b) -> p α (f β) Source #

type Traversal α β a b = Refractor ((~) (->)) Applicative α β a b Source #

lens :: (α -> a) -> (b -> α -> β) -> Lens α β a b Source #

iso :: (α -> a) -> (b -> β) -> Iso α β a b Source #

get :: ((a -> Const a b) -> α -> Const a β) -> α -> a Source #

set :: ((a -> Identity b) -> α -> Identity β) -> b -> α -> β Source #

modify :: ((a -> Identity b) -> α -> Identity β) -> (a -> b) -> α -> β Source #

mapping :: (Functor f, Functor g) => AnIso α β a b -> Iso (f α) (g β) (f a) (g b) Source #

fstL :: Lens (a, c) (b, c) a b Source #

sndL :: Lens (a, b) (a, c) b c Source #

swapL :: Iso (a, b) (c, d) (b, a) (d, c) Source #

unitL :: Lens α α () () Source #

bitL :: Bits a => Int -> Lens a a Bool Bool Source #