HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulegeneric-lens-core-2.2.1.0Haskell2010

Data.Generics.Internal.Profunctor.Lens

Internal lens helpers. Only exported for Haddock

  • 4 types
  • 16 values
typetype LensLike (p :: Type -> Type -> Type) s t a b = p a b -> p s t
#
valueravel :: (ALens a b i a b -> ALens a b i s t) -> Lens s t a b
#
valueset :: ((a -> b) -> s -> t) -> (s, b) -> t
#

Setting

valueview :: Lens s s a a -> s -> a
#
valuewithLensPrim
  1. :: Lens s t a b
  2. -> forall c. (s -> (c, a)) -> ((c, b) -> t) -> r
  3. -> r
#
valueidLens :: ALens a b i a b
#
valuefirst :: Strong p => p i (a x) (a' x) -> p i ((:*:) a b x) ((:*:) a' b x)
#

Lens focusing on the first element of a product

valuesecond :: Strong p => p i (b x) (b' x) -> p i ((:*:) a b x) ((:*:) a b' x)
#

Lens focusing on the second element of a product

valuefork :: (a -> b) -> (a -> c) -> a -> (b, c)
#
datadata Coyoneda (f :: Type -> Type) b
#

Constructors

  • forall a. Coyoneda (a -> b) (f a)
Instances1Functor
  • Functor (Coyoneda f)Defined in generic-lens-core-2.2.1.0 · Data.Generics.Internal.Profunctor.Lens
valueinj :: Functor f => Coyoneda f a -> f a
#
valueproj :: Functor f => f a -> Coyoneda f a
#
value(??) :: Functor f => f (a -> b) -> a -> f b
#
valueassoc3L
  1. :: Strong p
  2. => p i (a, (b, c)) (a', (b', c'))
  3. -> p i ((a, b), c) ((a', b'), c')
#
valuechoosing
  1. :: Lens s t a b
  2. -> Lens s' t' a b
  3. -> Lens (Either s s') (Either t t') a b
#
valuelens :: (s -> (c, a)) -> ((c, b) -> t) -> Lens s t a b
#
datadata ALens a b i s t
#

Constructors

  • forall c. ALens (s -> (c, a)) ((c, b) -> t)
Instances3Profunctor, Strong, Functor
  • Profunctor (ALens a b)Defined in generic-lens-core-2.2.1.0 · Data.Generics.Internal.Profunctor.Lens
  • Strong (ALens a b)Defined in generic-lens-core-2.2.1.0 · Data.Generics.Internal.Profunctor.Lens
  • Functor (ALens a b i s)Defined in generic-lens-core-2.2.1.0 · Data.Generics.Internal.Profunctor.Lens
valueswap :: (a, b) -> (b, a)
#