Portability | Type-Families |
---|---|

Stability | provisional |

Maintainer | Edward Kmett <ekmett@gmail.com> |

Safe Haskell | None |

- class (Functor (Rep p), Profunctor p) => Representable p where
- tabulated :: (Profunctor r, Functor f, Representable p, Representable q) => r (p d c) (f (q d' c')) -> r (d -> Rep p c) (f (d' -> Rep q c'))
- class (Functor (Corep p), Profunctor p) => Corepresentable p where
- type Corep p :: * -> *
- cotabulate :: (Corep p d -> c) -> p d c
- corep :: p d c -> Corep p d -> c

- cotabulated :: (Profunctor r, Functor h, Corepresentable p, Corepresentable q) => r (p d c) (h (q d' c')) -> r (Corep p d -> c) (h (Corep q d' -> c'))

# Representable Profunctors

class (Functor (Rep p), Profunctor p) => Representable p whereSource

A `Profunctor`

`p`

is `Representable`

if there exists a `Functor`

`f`

such that
`p d c`

is isomorphic to `d -> f c`

.

Representable (->) | |

(Functor (Rep (Kleisli m)), Profunctor (Kleisli m), Monad m, Functor m) => Representable (Kleisli m) | |

(Functor (Rep (UpStar f)), Profunctor (UpStar f), Functor f) => Representable (UpStar f) | |

(Functor (Rep (Procompose p q)), Profunctor (Procompose p q), Representable p, Representable q) => Representable (Procompose p q) | The composition of two |

tabulated :: (Profunctor r, Functor f, Representable p, Representable q) => r (p d c) (f (q d' c')) -> r (d -> Rep p c) (f (d' -> Rep q c'))Source

`tabulate`

and `rep`

form two halves of an isomorphism.

This can be used with the combinators from the `lens`

package.

`tabulated`

::`Representable`

p =>`Iso'`

(d ->`Rep`

p c) (p d c)

# Corepresentable Profunctors

class (Functor (Corep p), Profunctor p) => Corepresentable p whereSource

A `Profunctor`

`p`

is `Corepresentable`

if there exists a `Functor`

`f`

such that
`p d c`

is isomorphic to `f d -> c`

.

Corepresentable (->) | |

(Functor (Corep (Cokleisli w)), Profunctor (Cokleisli w), Functor w) => Corepresentable (Cokleisli w) | |

(Functor (Corep (DownStar f)), Profunctor (DownStar f), Functor f) => Corepresentable (DownStar f) | |

Corepresentable (Tagged *) | |

(Functor (Corep (Procompose p q)), Profunctor (Procompose p q), Corepresentable p, Corepresentable q) => Corepresentable (Procompose p q) |

cotabulated :: (Profunctor r, Functor h, Corepresentable p, Corepresentable q) => r (p d c) (h (q d' c')) -> r (Corep p d -> c) (h (Corep q d' -> c'))Source

`cotabulate`

and `corep`

form two halves of an isomorphism.

This can be used with the combinators from the `lens`

package.

`tabulated`

::`Corep`

f p =>`Iso'`

(f d -> c) (p d c)