categories-1.0.7: Categories

Copyright | 2008 Edward Kmett
License | BSD
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable (class-associated types)
Safe Haskell | Trustworthy
Language | Haskell2010

Control.Category.Cartesian.Closed

Contents

- Cartesian Closed Category
- Co-(Cartesian Closed Category)

Description

Synopsis

- class Cartesian k => CCC (k :: Type -> Type -> Type) where
  - type Exp (k :: Type -> Type -> Type) :: Type -> Type -> Type
  - apply :: k (Product k (Exp k a b) a) b
  - curry :: k (Product k a b) c -> k a (Exp k b c)
  - uncurry :: k a (Exp k b c) -> k (Product k a b) c
- unitCCC :: CCC k => k a (Exp k b (Product k b a))
- counitCCC :: CCC k => k (Product k b (Exp k b a)) a
- class CoCartesian k => CoCCC (k :: Type -> Type -> Type) where
  - type Coexp (k :: Type -> Type -> Type) :: Type -> Type -> Type
  - coapply :: k b (Sum k (Coexp k a b) a)
  - cocurry :: k c (Sum k a b) -> k (Coexp k b c) a
  - uncocurry :: k (Coexp k b c) a -> k c (Sum k a b)
- unitCoCCC :: CoCCC k => k a (Sum k b (Coexp k b a))
- counitCoCCC :: CoCCC k => k (Coexp k b (Sum k b a)) a

# Cartesian Closed Category

class Cartesian k => CCC (k :: Type -> Type -> Type) where Source #

A `CCC` has full-fledged monoidal finite products and exponentials

Associated Types

type Exp (k :: Type -> Type -> Type) :: Type -> Type -> Type Source #

Methods

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

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

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

#### Instances

Instances details

CCC (->) Source # |

Instance details

Defined in Control.Category.Cartesian.Closed

Associated Types

type Exp (->) |
Instance details Defined in Control.Category.Cartesian.Closed type Exp (->) = (->)

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 => k a (Exp k b (Product k b a)) Source #

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

# Co-(Cartesian Closed Category)

class CoCartesian k => CoCCC (k :: Type -> Type -> Type) where Source #

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

Associated Types

type Coexp (k :: Type -> Type -> Type) :: Type -> Type -> Type Source #

Methods

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

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

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

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

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