Portability | non-portable (class-associated types) |
---|---|
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.
- module Control.Bifunctor
- class Bifunctor p => Associative p where
- associate :: p (p a b) c -> p a (p b c)
- class Bifunctor s => Coassociative s where
- coassociate :: s a (s b c) -> s (s a b) c
Documentation
module Control.Bifunctor
class Bifunctor p => Associative 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
class Bifunctor s => Coassociative 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 :: s a (s b c) -> s (s a b) cSource