Formally, the class Profunctor represents a profunctor
from Hask -> Hask.
Intuitively it is a bifunctor where the first argument is contravariant and the second argument is covariant.
You can define a Profunctor by either defining dimap or by defining both lmap and rmap.
If you supply dimap, you should ensure that:
dimap id id ≡ idIf you supply lmap and rmap, ensure:
lmap id ≡ id
rmap id ≡ id
If you supply both, you should also ensure:
dimap f g ≡ lmap f . rmap gThese ensure by parametricity:
dimap (f . g) (h . i) ≡ dimap g h . dimap f i
lmap (f . g) ≡ lmap g . lmap f
rmap (f . g) ≡ rmap f . rmap g
Instances38Profunctor, …
Monad m => Profunctor (Kleisli m)Defined in profunctors-5.6.3 · Data.Profunctor.UnsafeProfunctor TaggedDefined in profunctors-5.6.3 · Data.Profunctor.UnsafeProfunctor (CopastroSum p)Defined in profunctors-5.6.3 · Data.Profunctor.ChoiceProfunctor (CotambaraSum p)Defined in profunctors-5.6.3 · Data.Profunctor.ChoiceProfunctor (PastroSum p)Defined in profunctors-5.6.3 · Data.Profunctor.ChoiceProfunctor (Environment p)Defined in profunctors-5.6.3 · Data.Profunctor.ClosedProfunctor (FreeMapping p)Defined in profunctors-5.6.3 · Data.Profunctor.MappingProfunctor (Copastro p)Defined in profunctors-5.6.3 · Data.Profunctor.StrongProfunctor (Cotambara p)Defined in profunctors-5.6.3 · Data.Profunctor.StrongProfunctor (Pastro p)Defined in profunctors-5.6.3 · Data.Profunctor.StrongProfunctor (Baz t)Defined in profunctors-5.6.3 · Data.Profunctor.TraversingProfunctor (Bazaar a)Defined in profunctors-5.6.3 · Data.Profunctor.TraversingProfunctor (FreeTraversing p)Defined in profunctors-5.6.3 · Data.Profunctor.TraversingProfunctor (Coyoneda p)Defined in profunctors-5.6.3 · Data.Profunctor.YonedaProfunctor (Yoneda p)Defined in profunctors-5.6.3 · Data.Profunctor.YonedaProfunctor p => Profunctor (TambaraSum p)Defined in profunctors-5.6.3 · Data.Profunctor.ChoiceProfunctor p => Profunctor (Closure p)Defined in profunctors-5.6.3 · Data.Profunctor.ClosedProfunctor p => Profunctor (CofreeMapping p)Defined in profunctors-5.6.3 · Data.Profunctor.MappingProfunctor p => Profunctor (Tambara p)Defined in profunctors-5.6.3 · Data.Profunctor.StrongProfunctor p => Profunctor (CofreeTraversing p)Defined in profunctors-5.6.3 · Data.Profunctor.TraversingFunctor f => Profunctor (Costar f)Defined in profunctors-5.6.3 · Data.Profunctor.TypesFunctor f => Profunctor (Star f)Defined in profunctors-5.6.3 · Data.Profunctor.TypesFunctor w => Profunctor (Cokleisli w)Defined in profunctors-5.6.3 · Data.Profunctor.UnsafeProfunctor (->)Defined in profunctors-5.6.3 · Data.Profunctor.UnsafeProfunctor (Forget r)Defined in profunctors-5.6.3 · Data.Profunctor.TypesContravariant f => Profunctor (Clown f)Defined in profunctors-5.6.3 · Data.Profunctor.UnsafeFunctor f => Profunctor (Joker f)Defined in profunctors-5.6.3 · Data.Profunctor.UnsafeArrow p => Profunctor (WrappedArrow p)Defined in profunctors-5.6.3 · Data.Profunctor.TypesProfunctor p => Profunctor (WrappedProfunctor p)Defined in invariant-0.6.4 · Data.Functor.InvariantProfunctor p => Profunctor (Codensity p)Defined in profunctors-5.6.3 · Data.Profunctor.Ran(Profunctor p, Profunctor q) => Profunctor (Product p q)Defined in profunctors-5.6.3 · Data.Profunctor.Unsafe(Profunctor p, Profunctor q) => Profunctor (Sum p q)Defined in profunctors-5.6.3 · Data.Profunctor.Unsafe(Functor f, Profunctor p) => Profunctor (Tannen f p)Defined in profunctors-5.6.3 · Data.Profunctor.Unsafe(Functor f, Profunctor p) => Profunctor (Cayley f p)Defined in profunctors-5.6.3 · Data.Profunctor.Cayley(Profunctor p, Profunctor q) => Profunctor (Procompose p q)Defined in profunctors-5.6.3 · Data.Profunctor.Composition(Profunctor p, Profunctor q) => Profunctor (Rift p q)Defined in profunctors-5.6.3 · Data.Profunctor.Composition(Profunctor p, Profunctor q) => Profunctor (Ran p q)Defined in profunctors-5.6.3 · Data.Profunctor.Ran(Profunctor p, Functor f, Functor g) => Profunctor (Biff p f g)Defined in profunctors-5.6.3 · Data.Profunctor.Unsafe