Functor module:Data package:profunctors

For a good explanation of profunctors in Haskell see Dan Piponi's article: http://blog.sigfpe.com/2011/07/profunctors-in-haskell.html For more information on strength and costrength, see: http://comonad.com/reader/2008/deriving-strength-from-laziness/
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 idid
If you supply lmap and rmap, ensure:
lmap idid
rmap idid
If you supply both, you should also ensure:
dimap f g ≡ lmap f . rmap g
These 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
Laws:
unit . counitid
counit . unitid
ProfunctorFunctor has a polymorphic kind since 5.6.