catalyst-0.0.0.1: A Category typeclass hierarchy powerful enough to encode full programs.
Safe HaskellNone
LanguageHaskell2010

Control.Category.Monoidal

Documentation

class SymmetricProduct k => MonoidalProduct k where Source #

Minimal complete definition

first' | second'

Methods

(***) :: (al `k` bl) -> (ar `k` br) -> (al, ar) `k` (bl, br) Source #

first' :: (a `k` b) -> (a, c) `k` (b, c) Source #

second' :: (a `k` b) -> (c, a) `k` (c, b) Source #

Instances

Instances details
MonoidalProduct ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Monoidal

Methods

(***) :: (al -> bl) -> (ar -> br) -> (al, ar) -> (bl, br) Source #

first' :: (a -> b) -> (a, c) -> (b, c) Source #

second' :: (a -> b) -> (c, a) -> (c, b) Source #

r ~ 'Req 'HasCategory 'HasSymmetricProduct symS 'HasMonoidalProduct monS cart cocart rec fix => MonoidalProduct (Catalyst r c) Source # 
Instance details

Defined in Control.Category.Free

Methods

(***) :: Catalyst r c al bl -> Catalyst r c ar br -> Catalyst r c (al, ar) (bl, br) Source #

first' :: Catalyst r c a b -> Catalyst r c (a, c0) (b, c0) Source #

second' :: Catalyst r c a b -> Catalyst r c (c0, a) (c0, b) Source #

class SymmetricSum k => MonoidalSum k where Source #

Minimal complete definition

left | right

Methods

(+++) :: (al `k` bl) -> (ar `k` br) -> Either al ar `k` Either bl br Source #

left :: (a `k` b) -> Either a c `k` Either b c Source #

right :: (a `k` b) -> Either c a `k` Either c b Source #

Instances

Instances details
MonoidalSum ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Monoidal

Methods

(+++) :: (al -> bl) -> (ar -> br) -> Either al ar -> Either bl br Source #

left :: (a -> b) -> Either a c -> Either b c Source #

right :: (a -> b) -> Either c a -> Either c b Source #

r ~ 'Req 'HasCategory symP 'HasSymmetricSum monP 'HasMonoidalSum cart cocart rec fix => MonoidalSum (Catalyst r c) Source # 
Instance details

Defined in Control.Category.Free

Methods

(+++) :: Catalyst r c al bl -> Catalyst r c ar br -> Catalyst r c (Either al ar) (Either bl br) Source #

left :: Catalyst r c a b -> Catalyst r c (Either a c0) (Either b c0) Source #

right :: Catalyst r c a b -> Catalyst r c (Either c0 a) (Either c0 b) Source #

class Category k => SymmetricProduct k where Source #

Methods

swap :: (l, r) `k` (r, l) Source #

reassoc :: (a, (b, c)) `k` ((a, b), c) Source #

Instances

Instances details
SymmetricProduct ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Monoidal

Methods

swap :: (l, r) -> (r, l) Source #

reassoc :: (a, (b, c)) -> ((a, b), c) Source #

r ~ 'Req 'HasCategory 'HasSymmetricProduct symS monP monS cart cocart rec fix => SymmetricProduct (Catalyst r c) Source # 
Instance details

Defined in Control.Category.Free

Methods

swap :: Catalyst r c (l, r0) (r0, l) Source #

reassoc :: Catalyst r c (a, (b, c0)) ((a, b), c0) Source #

class Category k => SymmetricSum k where Source #

Methods

swapE :: Either l r `k` Either r l Source #

reassocE :: Either a (Either b c) `k` Either (Either a b) c Source #

Instances

Instances details
SymmetricSum ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Category.Monoidal

Methods

swapE :: Either l r -> Either r l Source #

reassocE :: Either a (Either b c) -> Either (Either a b) c Source #

r ~ 'Req 'HasCategory symP 'HasSymmetricSum monP monS cart cocart rec fix => SymmetricSum (Catalyst r c) Source # 
Instance details

Defined in Control.Category.Free

Methods

swapE :: Catalyst r c (Either l r0) (Either r0 l) Source #

reassocE :: Catalyst r c (Either a (Either b c0)) (Either (Either a b) c0) Source #

class CategoryPlus k => CategoryZero k where Source #

Methods

zeroC :: k a b Source #

class Category k => CategoryPlus k where Source #

Methods

(<+>) :: k a b -> k a b -> k a b Source #