categories-0.3: Category LibraryContentsIndex
Control.Category.Bifunctor.Associative
Portabilitynon-portable (class-associated types)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>
Description

In order to appropriately represent the category of Haskell types and its dual, we need a category with a bifunctor that acts as a semigroup (that is to say 'is associative') but which unlike a monoidal category, lacks an identity (since there can be no initial object in the category Hask, but it also has a near-coproduct in the form of Either.

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.

Synopsis
class Bifunctor p k k k => Associative p k where
associate :: k (p (p a b) c) (p a (p b c))
class Bifunctor s k k k => Coassociative s k where
coassociate :: k (s a (s b c)) (s (s a b) c)
Documentation
class Bifunctor p k k k => Associative p k where

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

 second associate . associate . first associate = associate . associate
Methods
associate :: k (p (p a b) c) (p a (p b c))
show/hide Instances
Associative Either (->)
Associative (,) (->)
Coassociative p k => Associative p (Dual k)
(Cartesian k, Bifunctor f (Reader e k) (Reader e k) (Reader e k), Associative f k) => Associative f (Reader e k)
class Bifunctor s k k k => Coassociative s k where

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

 first coassociate . coassociate . second coassociate = coassociate . coassociate
Methods
coassociate :: k (s a (s b c)) (s (s a b) c)
show/hide Instances
Coassociative Either (->)
Coassociative (,) (->)
Associative p k => Coassociative p (Dual k)
(Cartesian k, Bifunctor f (Reader e k) (Reader e k) (Reader e k), Coassociative f k) => Coassociative f (Reader e k)
Produced by Haddock version 0.8