base-4.8.2.0: Basic libraries

Copyright(c) Ashley Yakeley 2007
LicenseBSD-style (see the LICENSE file in the distribution)
Maintainerashley@semantic.org
Stabilityexperimental
Portabilityportable
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Category

Description

 

Synopsis

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 * (->) Source 

Methods

id :: a -> a Source

(.) :: (b -> c) -> (a -> b) -> a -> c Source

Monad m => Category * (Kleisli m) Source 

Methods

id :: Kleisli m a a Source

(.) :: Kleisli m b c -> Kleisli m a b -> Kleisli m a c Source

Category k (Coercion k) Source 

Methods

id :: Coercion k a a Source

(.) :: Coercion k b c -> Coercion k a b -> Coercion k a c Source

Category k ((:~:) k) Source 

Methods

id :: (k :~: a) a Source

(.) :: (k :~: b) c -> (k :~: a) b -> (k :~: a) c Source

(<<<) :: 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