lenz-0.2.0.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 -> β) -> Lens α β 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 #

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

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

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

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