data-category-0.1.0: Restricted categories

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com

Data.Category.Pair

Description

Pair, the category with just 2 objects and their identity arrows. The limit and colimit of the functor from Pair to some category provide products and coproducts in that category.

Synopsis

Documentation

data Fst Source

One object of Pair

Constructors

Fst 

data Snd Source

The other object of Pair

Constructors

Snd 

data family Pair a b :: *Source

The arrows of Pair.

data PairF (~>) x y Source

The functor from Pair to (~>), a diagram of 2 objects in (~>).

Constructors

PairF 

Instances

CategoryO ~> y => FunctorA (PairF ~> x y) Snd Snd 
CategoryO ~> x => FunctorA (PairF ~> x y) Fst Fst 

class (CategoryO ~> x, CategoryO ~> y) => PairLimit (~>) x y whereSource

The product of 2 objects is the limit of the functor from Pair to (~>).

Associated Types

type Product x y :: *Source

Methods

pairLimit :: Limit (PairF ~> x y) (Product x y)Source

proj1 :: Product x y ~> xSource

proj2 :: Product x y ~> ySource

class (CategoryO ~> x, CategoryO ~> y) => PairColimit (~>) x y whereSource

The coproduct of 2 objects is the colimit of the functor from Pair to (~>).

Associated Types

type Coproduct x y :: *Source

Methods

pairColimit :: Colimit (PairF ~> x y) (Coproduct x y)Source

inj1 :: x ~> Coproduct x ySource

inj2 :: y ~> Coproduct x ySource