categories-0.59: categories from category-extras

Portabilitynon-portable (class-associated types)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe-Infered

Control.Category.Cartesian.Closed

Contents

Description

 

Synopsis

Cartesian Closed Category

class (Cartesian <=, Symmetric <= (Product <=), Monoidal <= (Product <=)) => CCC (<=) whereSource

A CCC has full-fledged monoidal finite products and exponentials

Associated Types

type Exp (<=) :: * -> * -> *Source

Methods

apply :: Product <= (Exp <= a b) a <= bSource

curry :: (Product <= a b <= c) -> a <= Exp <= b cSource

uncurry :: (a <= Exp <= b c) -> Product <= a b <= cSource

Instances

CCC (->) 

unitCCC :: CCC <= => a <= Exp <= b (Product <= b a)Source

counitCCC :: CCC <= => Product <= b (Exp <= b a) <= aSource

Co-(Cartesian Closed Category)

class (CoCartesian <=, Symmetric <= (Sum <=), Comonoidal <= (Sum <=)) => CoCCC (<=) whereSource

A Co-CCC has full-fledged comonoidal finite coproducts and coexponentials

Associated Types

type Coexp (<=) :: * -> * -> *Source

Methods

coapply :: b <= Sum <= (Coexp <= a b) aSource

cocurry :: (c <= Sum <= a b) -> Coexp <= b c <= aSource

uncocurry :: (Coexp <= b c <= a) -> c <= Sum <= a bSource

unitCoCCC :: CoCCC <= => a <= Sum <= b (Coexp <= b a)Source

counitCoCCC :: (CoCCC <=, subtract ~ Coexp <=, + ~ Sum <=) => subtract b (b + a) <= aSource