data-category-0.5.0: Category theory

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com
Safe HaskellSafe-Inferred

Data.Category

Contents

Description

 

Synopsis

Category

class Category k whereSource

An instance of Category k declares the arrow k as a category.

Methods

src :: k a b -> Obj k aSource

tgt :: k a b -> Obj k bSource

(.) :: k b c -> k a b -> k a cSource

Instances

Category (->)

The category with Haskell types as objects and Haskell functions as arrows.

Category Cat

Cat is the category with categories as objects and funtors as arrows.

Category Unit

Unit is the category with one object.

Category Void

Void is the category with no objects.

Category AdjArrow

The category with categories as objects and adjunctions as arrows.

Category Boolean

Boolean is the category with true and false as objects, and an arrow from false to true.

Category Simplex

The (augmented) simplex category is the category of finite ordinals and order preserving maps.

Category k => Category (Op k)

Op k is opposite category of the category k.

Category (f (Fix f)) => Category (Fix f)

Fix f is the fixed point category for a category combinator f.

Category (Kleisli m)

The category of Kleisli arrows.

(Category c1, Category c2) => Category (:**: c1 c2)

The product category of category c1 and c2.

(Category c, Category d) => Category (Nat c d)

Functor category D^C. Objects of D^C are functors from C to D. Arrows of D^C are natural transformations.

(Category c1, Category c2) => Category (:>>: c1 c2)

The directed coproduct category of categories c1 and c2.

(Category c1, Category c2) => Category (:++: c1 c2)

The coproduct category of categories c1 and c2.

Category (MonoidAsCategory f m)

A monoid as a category with one object.

Category (Dialg f g)

The category of (F,G)-dialgebras.

(Category (Dom t), Category (Dom s)) => Category (:/\: t s)

The comma category T \downarrow S

type Obj k a = k a aSource

Whenever objects are required at value level, they are represented by their identity arrows.

Opposite category

data Op k a b Source

Constructors

Op 

Fields

unOp :: k b a
 

Instances

Category k => Category (Op k)

Op k is opposite category of the category k.

(Category (Op k), HasBinaryProducts k) => HasBinaryCoproducts (Op k)

Binary products are the dual of binary coproducts.

(Category (Op k), HasBinaryCoproducts k) => HasBinaryProducts (Op k)

Binary products are the dual of binary coproducts.

(Category (Op k), HasTerminalObject k) => HasInitialObject (Op k)

Terminal objects are the dual of initial objects.

(Category (Op k), HasInitialObject k) => HasTerminalObject (Op k)

Terminal objects are the dual of initial objects.

(HasTerminalObject (Presheaves k), HasBinaryProducts (Presheaves k), Category k) => CartesianClosed (Presheaves k)

The category of presheaves on a category C is cartesian closed for any C.