pipes-core-0.1.0: Compositional pipelines

Safe HaskellSafe-Infered

Control.Category.Multiplicative

Description

This module contains Multiplicative and Comultiplicative type classes, which provide a generalization of splitP and joinP to arbitrary monoidal categories.

Synopsis

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

Methods

unit :: k (Id k p) aSource

mult :: k (p a a) aSource

Instances

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

Methods

counit :: k a (Id k p)Source

comult :: k a (p a a)Source

Instances