categories-1.0.7: Categories

Copyright2008 Edward Kmett
LicenseBSD
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable (class-associated types)
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Category.Cartesian.Closed

Contents

Description

 

Synopsis

Cartesian Closed Category

class Cartesian k => CCC k where Source #

A CCC has full-fledged monoidal finite products and exponentials

Minimal complete definition

apply, curry, uncurry

Associated Types

type Exp k :: * -> * -> * Source #

Methods

apply :: Product k (Exp k a b) a `k` b Source #

curry :: (Product k a b `k` c) -> a `k` Exp k b c Source #

uncurry :: (a `k` Exp k b c) -> Product k a b `k` c Source #

Instances

CCC (->) Source # 

Associated Types

type Exp ((->) :: * -> * -> *) :: * -> * -> * Source #

Methods

apply :: Product (->) (Exp (->) a b) a -> b Source #

curry :: (Product (->) a b -> c) -> a -> Exp (->) b c Source #

uncurry :: (a -> Exp (->) b c) -> Product (->) a b -> c Source #

unitCCC :: CCC k => a `k` Exp k b (Product k b a) Source #

counitCCC :: CCC k => Product k b (Exp k b a) `k` a Source #

Co-(Cartesian Closed Category)

class CoCartesian k => CoCCC k where Source #

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

Minimal complete definition

coapply, cocurry, uncocurry

Associated Types

type Coexp k :: * -> * -> * Source #

Methods

coapply :: b `k` Sum k (Coexp k a b) a Source #

cocurry :: (c `k` Sum k a b) -> Coexp k b c `k` a Source #

uncocurry :: (Coexp k b c `k` a) -> c `k` Sum k a b Source #

unitCoCCC :: CoCCC k => a `k` Sum k b (Coexp k b a) Source #

counitCoCCC :: CoCCC k => Coexp k b (Sum k b a) `k` a Source #