Portability | portable |
---|---|

Stability | experimental |

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

NB: this contradicts another common meaning for an `Associative`

`Category`

, which is one
where the pentagonal condition does not hold, but for which there is an identity.

- class Bifunctor p k k k => Associative k p where
- associate :: k (p (p a b) c) (p a (p b c))

- class Bifunctor s k k k => Coassociative k s where
- coassociate :: k (s a (s b c)) (s (s a b) c)

# Documentation

class Bifunctor p k k k => Associative k p whereSource

A category with an associative bifunctor satisfying Mac Lane's pentagonal coherence identity law:

bimap id associate . associate . bimap associate id = associate . associate

Associative Hask Either | |

Associative Hask (,) | |

Associative Hask (Const2 t) | |

Coassociative Hask p => Associative Hask (Flip p) |

class Bifunctor s k k k => Coassociative k s whereSource

A category with a coassociative bifunctor satisyfing the dual of Mac Lane's pentagonal coherence identity law:

bimap coassociate id . coassociate . bimap id coassociate = coassociate . coassociate

coassociate :: k (s a (s b c)) (s (s a b) c)Source

Coassociative Hask Either | |

Coassociative Hask (,) | |

Coassociative Hask (Const2 t) | |

Associative Hask p => Coassociative Hask (Flip p) |