| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Type.Attenuation.Profunctor
Contents
Description
Attenuations for Profunctors.
Synopsis
- lcontra :: (Profunctor p, Representational0 p) => Variance (p b x) (p a x) a b
- rco :: (Profunctor p, Representational1 p) => Variance (p x a) (p x b) a b
- profunctoriality :: forall p a b c d. (Representational0 p, Representational1 p, Profunctor p) => (Attenuable a c, Attenuable b d) :- Attenuable (p c b) (p a d)
Profunctor Attenuations
lcontra :: (Profunctor p, Representational0 p) => Variance (p b x) (p a x) a b Source #
Lift an Attenuation contravariantly over the left of a Profunctor.
Similarly to the use of Contravariant in
contra, we use Profunctor to guarantee
contravariance in the appropriate parameter.
rco :: (Profunctor p, Representational1 p) => Variance (p x a) (p x b) a b Source #
Lift an Attenuation covariantly over the right of a Profunctor.
Similarly to the use of Functor in co, we use
Profunctor to guarantee covariance in the appropriate parameter.
As with sndco, this functions the same as
co, but the needed Functor instance might not be
available in polymorphic contexts.
profunctoriality :: forall p a b c d. (Representational0 p, Representational1 p, Profunctor p) => (Attenuable a c, Attenuable b d) :- Attenuable (p c b) (p a d) Source #
Profunctors map attenuations profunctorially.