Control.Category

base-4.8.1.0: Basic libraries

Copyright | (c) Ashley Yakeley 2007
License | BSD-style (see the LICENSE file in the distribution)
Maintainer | ashley@semantic.org
Stability | experimental
Portability | portable
Safe Haskell | Trustworthy
Language | Haskell2010

Control.Category

Description

Synopsis

- class Category cat where
  - id :: cat a a
  - (.) :: cat b c -> cat a b -> cat a c
- (<<<) :: Category cat => cat b c -> cat a b -> cat a c
- (>>>) :: Category cat => cat a b -> cat b c -> cat a c

# Documentation

class Category cat where Source

A class for categories. id and (.) must form a monoid.

Methods

id :: cat a a Source

the identity morphism

(.) :: cat b c -> cat a b -> cat a c infixr 9 Source

morphism composition

Instances

Category * (->) |
Monad m => Category * (Kleisli m) |
Category k (Coercion k) |
Category k ((:~:) k) |

(<<<) :: Category cat => cat b c -> cat a b -> cat a c infixr 1 Source

Right-to-left composition

(>>>) :: Category cat => cat a b -> cat b c -> cat a c infixr 1 Source

Left-to-right composition