Portability | Rank2Types, TFs |
---|---|
Stability | provisional |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | Trustworthy |
- newtype Codensity p a b = Codensity {
- runCodensity :: forall x. p x a -> p x b
- decomposeCodensity :: Procompose (Codensity p) p a b -> p a b
Documentation
newtype Codensity p a b Source
This represents the right Kan extension of a Profunctor
p
along itself. This provides a generalization of the "difference list" trick to profunctors.
Codensity | |
|
Category (Codensity p) | |
Profunctor p => Profunctor (Codensity p) | |
Profunctor p => Functor (Codensity p a) |
decomposeCodensity :: Procompose (Codensity p) p a b -> p a bSource