categories-1.0.7: Categories

Copyright | 2008 Edward Kmett
License | BSD
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell2010

Control.Category.Associative

Description

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

Synopsis

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

# Documentation

class Bifunctor p k k k => Associative (k :: Type -> Type -> Type) (p :: Type -> Type -> Type) where Source #

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

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

Methods

associate :: k (p (p a b) c) (p a (p b c)) Source #

disassociate :: k (p a (p b c)) (p (p a b) c) Source #

#### Instances

Instances details

Associative (->) Either Source # |
Instance details Defined in Control.Category.Associative Methods associate :: Either (Either a b) c -> Either a (Either b c) Source # disassociate :: Either a (Either b c) -> Either (Either a b) c Source #
Associative (->) (,) Source # |
Instance details Defined in Control.Category.Associative Methods associate :: ((a, b), c) -> (a, (b, c)) Source # disassociate :: (a, (b, c)) -> ((a, b), c) Source #