generic-lens-2.2.1.0: Generically derive traversals, lenses and prisms.
Safe Haskell None
Language Haskell2010

Data.Generics.Internal.VL

Synopsis

Documentation

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

Type alias for lens

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

view :: ((a -> Const a a) -> s -> Const a s) -> s -> a Source #

(^.) :: s -> ((a -> Const a a) -> s -> Const a s) -> a infixl 8 Source #

Getting

(.~) :: ((a -> Identity b) -> s -> Identity t) -> b -> s -> t infixr 4 Source #

set :: Lens s t a b -> b -> s -> t Source #

over :: ((a -> Identity b) -> s -> Identity t) -> (a -> b) -> s -> t Source #

ravel :: ( ALens a b i a b -> ALens a b i s t) -> Lens s t a b Source #

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

data Exchange a b s t Source #

Constructors

Exchange (s -> a) (b -> t)

Instances

Instances details
Profunctor ( Exchange a b) Source #
Instance details

Defined in Data.Generics.Internal.VL.Iso

Methods

dimap :: (a0 -> b0) -> (c -> d) -> Exchange a b b0 c -> Exchange a b a0 d Source #

lmap :: (a0 -> b0) -> Exchange a b b0 c -> Exchange a b a0 c Source #

rmap :: (b0 -> c) -> Exchange a b a0 b0 -> Exchange a b a0 c Source #

(#.) :: forall a0 b0 c q. Coercible c b0 => q b0 c -> Exchange a b a0 b0 -> Exchange a b a0 c Source #

(.#) :: forall a0 b0 c q. Coercible b0 a0 => Exchange a b b0 c -> q a0 b0 -> Exchange a b a0 c Source #

Functor ( Exchange a b s) Source #
Instance details

Defined in Data.Generics.Internal.VL.Iso

Methods

fmap :: (a0 -> b0) -> Exchange a b s a0 -> Exchange a b s b0 Source #

(<$) :: a0 -> Exchange a b s b0 -> Exchange a b s a0 Source #

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

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

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

Extract the two functions, one from s -> a and one from b -> t that characterize an Iso .

repIso :: ( Generic a, Generic b) => Iso a b ( Rep a x) ( Rep b x) Source #

A type and its generic representation are isomorphic

mIso :: Iso ( M1 i c f p) ( M1 i c g p) (f p) (g p) Source #

M1 is just a wrapper around `f p`

kIso :: Iso ( K1 r a p) ( K1 r b p) a b Source #

prodIso :: Iso ((a :*: b) x) ((a' :*: b') x) (a x, b x) (a' x, b' x) Source #

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

type Prism s t a b = forall p f. ( Choice p, Applicative f) => p a (f b) -> p s (f t) Source #

Type alias for prism

build :: Prism s t a b -> b -> t Source #

prism :: (b -> t) -> (s -> Either t a) -> Prism s t a b Source #

data Market a b s t Source #

Constructors

Market (b -> t) (s -> Either t a)

Instances

Instances details
Choice ( Market a b) Source #
Instance details

Defined in Data.Generics.Internal.VL.Prism

Profunctor ( Market a b) Source #
Instance details

Defined in Data.Generics.Internal.VL.Prism

Methods

dimap :: (a0 -> b0) -> (c -> d) -> Market a b b0 c -> Market a b a0 d Source #

lmap :: (a0 -> b0) -> Market a b b0 c -> Market a b a0 c Source #

rmap :: (b0 -> c) -> Market a b a0 b0 -> Market a b a0 c Source #

(#.) :: forall a0 b0 c q. Coercible c b0 => q b0 c -> Market a b a0 b0 -> Market a b a0 c Source #

(.#) :: forall a0 b0 c q. Coercible b0 a0 => Market a b b0 c -> q a0 b0 -> Market a b a0 c Source #

Functor ( Market a b s) Source #
Instance details

Defined in Data.Generics.Internal.VL.Prism

Methods

fmap :: (a0 -> b0) -> Market a b s a0 -> Market a b s b0 Source #

(<$) :: a0 -> Market a b s b0 -> Market a b s a0 Source #