category-extras-0.44.4: Various modules and constructs inspired by category theory

Portabilityportable
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Bifunctor.Braided

Description

 

Synopsis

Documentation

class Bifunctor p => Braided p whereSource

A braided (co)(monoidal or associative) category can commute the arguments of its bi-endofunctor. Obeys the laws:

 idr . braid = idl 
 idl . braid = idr 
 braid . coidr = coidl 
 braid . coidl = coidr 
 associate . braid . associate = second braid . associate . first braid 
 coassociate . braid . coassociate = first braid . coassociate . second braid 

Methods

braid :: p a b -> p b aSource

Instances

Braided Either 
Braided (,) 
Braided p => Braided (SwapB p) 
(Functor f, Braided p) => Braided (FunctorB f p) 
(Bifunctor p, Braided f, Braided g) => Braided (CompB p f g) 
(Functor f, Braided p) => Braided (BiffB p f f) 

class Braided p => Symmetric p Source

If we have a symmetric (co)Monoidal category, you get the additional law:

 swap . swap = id

swap :: Symmetric p => p a b -> p b aSource