Copyright | (C) 2014 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | Rank2Types, TFs |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
- 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 b Source