primus-0.3.0.0: nonempty and positive functions
Safe HaskellSafe-Inferred
LanguageHaskell2010

Primus.Lens

Description

 
Synopsis

Documentation

type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t Source #

lens type synonym

type Lens' s a = Lens s s a a Source #

simpler lens type synonym

lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b Source #

create a lens

type Iso s t a b = forall p f. (Profunctor p, Functor f) => p a (f b) -> p s (f t) Source #

isomorphism type synonym

type Iso' s a = Iso s s a a Source #

simpler isomorphism type synonym

iso :: (s -> a) -> (b -> t) -> Iso s t a b Source #

create an isomoprhism

type Traversal s t a b = forall f. Applicative f => (a -> f b) -> s -> f t Source #

traversal type synonym

_Fst :: forall a x a'. Lens (a, x) (a', x) a a' Source #

lens for accessing the first value in a tuple

_Snd :: forall x b b'. Lens (x, b) (x, b') b b' Source #

lens for accessing the second value in a tuple