profunctors-5.1.2: Profunctors

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 | Safe
Language | Haskell2010

Data.Profunctor.Codensity

Description

Synopsis

- 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.

Constructors

Codensity |

Fields

runCodensity :: forall x. p x a -> p x b

Instances

Category * (Codensity p) Source |
Profunctor p => Profunctor (Codensity p) Source |
Profunctor p => Functor (Codensity p a) Source |

decomposeCodensity :: Procompose (Codensity p) p a b -> p a b Source