semigroupoids-4.0: Semigroupoids: Category sans id

PortabilityMPTCs, GADTs
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe

Data.Semifunctor.Braided

Description

 

Documentation

class Associative k p => Braided k p whereSource

Methods

braid :: k (p (a, b)) (p (b, a))Source

Instances

Braided (->) (Bi Either) 
Braided (->) (Bi (,)) 
(Bind m, Monad m) => Braided (Kleisli m) (Bi (,)) 
(Bind m, Monad m) => Braided (Kleisli m) (Bi Either) 
(Extend w, Comonad w) => Braided (Cokleisli w) (Bi (,)) 

kleisliBraid :: (Monad m, Semifunctor p (Product (Kleisli m) (Kleisli m)) (Kleisli m), Braided (->) p) => Kleisli m (p (a, b)) (p (b, a))Source

cokleisliBraid :: (Extend w, Comonad w, Semifunctor p (Product (Cokleisli w) (Cokleisli w)) (Cokleisli w), Braided (->) p) => Cokleisli w (p (a, b)) (p (b, a))Source

class Braided k p => Symmetric k p Source

Instances

Symmetric (->) (Bi Either) 
Symmetric (->) (Bi (,)) 
(Bind m, Monad m) => Symmetric (Kleisli m) (Bi (,)) 
(Bind m, Monad m) => Symmetric (Kleisli m) (Bi Either) 
(Extend w, Comonad w) => Symmetric (Cokleisli w) (Bi (,)) 

swap :: Symmetric k p => k (p (a, b)) (p (b, a))Source