categories-1.0.7: Categories

Copyright | 20082012 Edward Kmett
License | BSD
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable (class-associated types)
Safe Haskell | Safe-Inferred
Language | Haskell2010

Control.Category.Monoidal

Description

A `Monoidal` category is a category with an associated biendofunctor that has an identity, which satisfies Mac Lane''s pentagonal and triangular coherence conditions Technically we usually say that category is `Monoidal`, but since most interesting categories in our world have multiple candidate bifunctors that you can use to enrich their structure, we choose here to think of the bifunctor as being monoidal. This lets us reuse the same `Bifunctor` over different categories without painful newtype wrapping.

Synopsis

- class Associative k p => Monoidal (k :: Type -> Type -> Type) (p :: Type -> Type -> Type) where
  - type Id (k :: Type -> Type -> Type) (p :: Type -> Type -> Type)
  - idl :: k (p (Id k p) a) a
  - idr :: k (p a (Id k p)) a
  - coidl :: k a (p (Id k p) a)
  - coidr :: k a (p a (Id k p))

# Documentation

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

Denotes that we have some reasonable notion of `Identity` for a particular `Bifunctor` in this `Category`. This notion is currently used by both `Monoidal` and `Comonoidal`

A monoidal category. `idl` and `idr` are traditionally denoted lambda and rho the triangle identities hold:

    first idr = second idl . associate
    second idl = first idr . associate
    first idr = disassociate . second idl
    second idl = disassociate . first idr
    idr . coidr = id
    idl . coidl = id
    coidl . idl = id
    coidr . idr = id

Associated Types

type Id (k :: Type -> Type -> Type) (p :: Type -> Type -> Type) Source #

Methods

idl :: k (p (Id k p) a) a Source #

idr :: k (p a (Id k p)) a Source #

coidl :: k a (p (Id k p) a) Source #

coidr :: k a (p a (Id k p)) Source #

#### Instances

Instances details

Monoidal (->) Either Source # |

Instance details

Defined in Control.Category.Monoidal

Associated Types

type Id (->) Either |
Instance details Defined in Control.Category.Monoidal type Id (->) Either = Void

Methods

idl :: Either (Id (->) Either) a -> a Source #

idr :: Either a (Id (->) Either) -> a Source #

coidl :: a -> Either (Id (->) Either) a Source #

coidr :: a -> Either a (Id (->) Either) Source #

Monoidal (->) (,) Source # |

Instance details

Defined in Control.Category.Monoidal

Associated Types

type Id (->) (,) |
Instance details Defined in Control.Category.Monoidal type Id (->) (,) = ()

Methods

idl :: (Id (->) (,), a) -> a Source #

idr :: (a, Id (->) (,)) -> a Source #

coidl :: a -> (Id (->) (,), a) Source #

coidr :: a -> (a, Id (->) (,)) Source #