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

Control.Category.Cartesian

Documentation

class MonoidalProduct k => Cartesian k where Source #

Minimal complete definition

consume, copy, fst', snd'

Methods

(&&&) :: (a `k` l) -> (a `k` r) -> a `k` (l, r) Source #

consume :: a `k` () Source #

copy :: a `k` (a, a) Source #

fst' :: (l, r) `k` l Source #

snd' :: (l, r) `k` r Source #

Instances

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

Defined in Control.Category.Cartesian

Methods

(&&&) :: (a -> l) -> (a -> r) -> a -> (l, r) Source #

consume :: a -> () Source #

copy :: a -> (a, a) Source #

fst' :: (l, r) -> l Source #

snd' :: (l, r) -> r Source #

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

Defined in Control.Category.Free

Methods

(&&&) :: Catalyst r c a l -> Catalyst r c a r0 -> Catalyst r c a (l, r0) Source #

consume :: Catalyst r c a () Source #

copy :: Catalyst r c a (a, a) Source #

fst' :: Catalyst r c (l, r0) l Source #

snd' :: Catalyst r c (l, r0) r0 Source #

class MonoidalSum k => Cocartesian k where Source #

Minimal complete definition

injectL, injectR, unify, tag

Methods

(|||) :: (al `k` b) -> (ar `k` b) -> Either al ar `k` b Source #

injectL :: a `k` Either a b Source #

injectR :: a `k` Either b a Source #

unify :: Either a a `k` a Source #

tag :: k (Bool, a) (Either a a) Source #

tags Right when True, Left when False

Instances

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

Defined in Control.Category.Cartesian

Methods

(|||) :: (al -> b) -> (ar -> b) -> Either al ar -> b Source #

injectL :: a -> Either a b Source #

injectR :: a -> Either b a Source #

unify :: Either a a -> a Source #

tag :: (Bool, a) -> Either a a Source #

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

Defined in Control.Category.Free

Methods

(|||) :: Catalyst r c al b -> Catalyst r c ar b -> Catalyst r c (Either al ar) b Source #

injectL :: Catalyst r c a (Either a b) Source #

injectR :: Catalyst r c a (Either b a) Source #

unify :: Catalyst r c (Either a a) a Source #

tag :: Catalyst r c (Bool, a) (Either a a) Source #