Portability | non-portable (class-associated types) |
---|---|

Stability | experimental |

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

Safe Haskell | Safe-Infered |

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.

# Documentation

class Associative k p => Monoidal k p whereSource

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