Clean-0.4: A light, clean and powerful utility library

Safe HaskellNone

Clean.Lens

Documentation

type LensLike f s t a b = (s -> f t) -> a -> f bSource

type LensLike' f a b = LensLike f b b a aSource

type Lens s t a b = forall f. Functor f => LensLike f s t a bSource

type Lens' a b = Lens b b a aSource

lens :: (a -> s) -> (a -> t -> b) -> Lens s t a bSource

iso :: (a -> s) -> (t -> b) -> Lens s t a bSource

iso' :: (a -> b) -> (b -> a) -> Lens' a bSource

lam :: Functor f => (a -> s) -> LensLike f s t a aSource

(^.) :: a -> Lens' a b -> bSource

type Traversal s t a b = forall f. Applicative f => LensLike f s t a bSource

type Traversal' a b = Traversal b b a aSource

(%~) :: Traversal' a b -> (b -> b) -> a -> aSource

(.~) :: Traversal' a b -> b -> a -> aSource

prism :: (a -> b :+: s) -> (a -> t -> b) -> Traversal s t a bSource

prism' :: (a -> a :+: b) -> (a -> b -> a) -> Traversal' a bSource

_1 :: Functor f => LensLike f s t (s, t1) (t, t1)Source

_2 :: Lens' (a :*: b) bSource

_list :: Lens' [a] (() :+: (a :*: [a]))Source

_drop :: Int -> Traversal' [a] [a]Source