lens-0.1: Lenses and Lens Families

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe-Infered

Control.Lens.Multi

Contents

Description

Synopsis

Lenses

type MultiLens a b = forall f. Applicative f => (b -> f b) -> a -> f aSource

type MultiLensFamily a b c d = forall f. Applicative f => (c -> f d) -> a -> f bSource

Common lenses

constML :: Applicative f => (a -> f a) -> b -> f bSource

mapML :: (Applicative f, Ord k) => k -> (v -> f v) -> Map k v -> f (Map k v)Source

intMapML :: Applicative f => Int -> (v -> f v) -> IntMap v -> f (IntMap v)Source

headML :: Applicative f => (a -> f a) -> [a] -> f [a]Source

tailML :: Applicative f => ([a] -> f [a]) -> [a] -> f [a]Source

leftML :: Applicative f => (a -> f b) -> Either a c -> f (Either b c)Source

elementML :: (Applicative f, Traversable t) => Int -> (a -> f a) -> t a -> f (t a)Source