Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Lens s t a b = forall p. IsLens p => Optic p s t a b
- type Lens' s a = Lens s s a a
- class (IsIso p, Strong p) => IsLens p
- lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b
- withLens :: Lens s t a b -> ((s -> a) -> (s -> b -> t) -> r) -> r
- alongside :: Lens s1 t1 a1 b1 -> Lens s2 t2 a2 b2 -> Lens (s1, s2) (t1, t2) (a1, a2) (b1, b2)
- newtype UnpackedLens a b s t = UnpackedLens {
- withUnpackedLens :: forall r. ((s -> a) -> (s -> b -> t) -> r) -> r
- unpackedLens :: (s -> a) -> (s -> b -> t) -> UnpackedLens a b s t
Lenses
class (IsIso p, Strong p) => IsLens p Source #
Instances
Monad m => IsLens (Kleisli m) Source # | |
Defined in Fresnel.Lens.Internal | |
Functor f => IsLens (OptionalStar f) Source # | |
Defined in Fresnel.Lens.Internal | |
IsLens (UnpackedLens a b) Source # | |
Defined in Fresnel.Lens | |
IsLens (UnpackedOptional a b) Source # | |
Defined in Fresnel.Optional | |
IsLens (Forget r :: Type -> Type -> TYPE LiftedRep) Source # | |
Defined in Fresnel.Lens.Internal | |
Functor f => IsLens (Star f) Source # | |
Defined in Fresnel.Lens.Internal | |
IsLens (->) Source # | |
Defined in Fresnel.Lens.Internal |
Construction
Elimination
Combinators
alongside :: Lens s1 t1 a1 b1 -> Lens s2 t2 a2 b2 -> Lens (s1, s2) (t1, t2) (a1, a2) (b1, b2) Source #
Unpacked
newtype UnpackedLens a b s t Source #
A Lens
unpacked into the get & set functions it was constructed from.
UnpackedLens | |
|
Instances
IsIso (UnpackedLens a b) Source # | |
Defined in Fresnel.Lens | |
IsLens (UnpackedLens a b) Source # | |
Defined in Fresnel.Lens | |
Strong (UnpackedLens a b) Source # | |
Defined in Fresnel.Lens first' :: UnpackedLens a b a0 b0 -> UnpackedLens a b (a0, c) (b0, c) second' :: UnpackedLens a b a0 b0 -> UnpackedLens a b (c, a0) (c, b0) | |
Profunctor (UnpackedLens a b) Source # | |
Defined in Fresnel.Lens dimap :: (a0 -> b0) -> (c -> d) -> UnpackedLens a b b0 c -> UnpackedLens a b a0 d lmap :: (a0 -> b0) -> UnpackedLens a b b0 c -> UnpackedLens a b a0 c rmap :: (b0 -> c) -> UnpackedLens a b a0 b0 -> UnpackedLens a b a0 c (#.) :: forall a0 b0 c q. Coercible c b0 => q b0 c -> UnpackedLens a b a0 b0 -> UnpackedLens a b a0 c (.#) :: forall a0 b0 c q. Coercible b0 a0 => UnpackedLens a b b0 c -> q a0 b0 -> UnpackedLens a b a0 c |
unpackedLens :: (s -> a) -> (s -> b -> t) -> UnpackedLens a b s t Source #