Safe Haskell | Safe-Infered |
---|

This module contains Multiplicative and Comultiplicative type classes,
which provide a generalization of `splitP`

and `joinP`

to arbitrary monoidal
categories.

- class Monoidal k p => Multiplicative k p where
- class Monoidal k p => Comultiplicative k p where

# Documentation

class Monoidal k p => Multiplicative k p whereSource

Monoidal category with a multiplication natural transformation.

A multiplicative structure on `k`

is the same thing as a monoid object
structure on the identity functor, when End(k) is given the pointwise
monoidal structure.

Laws:

first unit . mult = idl second unit . mult = idr mult . first mult = mult . second mult . associate

Monad m => Multiplicative (PipeC m r) Either |

class Monoidal k p => Comultiplicative k p whereSource

Comonoidal category with a comultiplication natural transformation.

A comultiplicative structure on `k`

is the same thing as a coalgebra object
structure on the identity functor, when End(k) is given the pointwise
comonoidal structure.

Laws:

first counit . comult = coidl second counit . comult = coidr first diag . diag = disassociate . second diag . diag

Monad m => Comultiplicative (PipeC m r) Either |