data-category-0.3.1.1: Restricted categories

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com

Data.Category

Contents

Description

 

Synopsis

Category

class Category (~>) whereSource

An instance of Category (~>) declares the arrow (~>) as a category.

Methods

src :: (a ~> b) -> Obj ~> aSource

tgt :: (a ~> b) -> Obj ~> bSource

(.) :: (b ~> c) -> (a ~> b) -> 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 AdjArrow

The category with categories as objects and adjunctions as arrows.

Category Mon

The category of all monoids, with monoid morphisms as arrows.

Category Boolean

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

Category Omega 
Category ~> => Category (Op ~>)

Op (~>) is opposite category of the category (~>).

Category (Discrete Z)

Discrete Z is the discrete category with no objects.

Category (Discrete n) => Category (Discrete (S n))

Discrete (S n) is the discrete category with one object more than Discrete n.

Monoid m => Category (MonoidA m)

A monoid as a category with one object.

HasTerminalObject ~> => Category (Peano ~>) 
(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 product category of category c1 and c2.

Category (MonoidAsCategory f m) 
(Dom m ~ ~>, Cod m ~ ~>, Category ~>, Functor m) => Category (Kleisli ~> m) 
Category (Dialg f g) 
(Category (Dom t), Category (Dom s)) => Category (:/\: t s) 

type Obj (~>) a = a ~> aSource

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

Opposite category

data Op (~>) a b Source

Constructors

Op 

Fields

unOp :: b ~> a
 

Instances

Category ~> => Category (Op ~>)

Op (~>) is opposite category of the category (~>).