gasp-1.2.0.0: A framework of algebraic classes

Safe HaskellSafe
LanguageHaskell2010

Algebra.Category

Synopsis

Documentation

class Category (cat :: k -> k -> Type) where Source #

A class for categories. Instances should satisfy the laws

f . id  =  f  -- (right identity)
id . f  =  f  -- (left identity)
f . (g . h)  =  (f . g) . h  -- (associativity)

Associated Types

type Con (a :: k) :: Constraint Source #

Methods

(.) :: (Con a, Con b, Con c) => (b `cat` c) -> (a `cat` b) -> a `cat` c infixr 9 Source #

id :: Con a => a `cat` a Source #

Instances
Category ((->) :: Type -> Type -> Type) Source # 
Instance details

Defined in Algebra.Category

Associated Types

type Con a :: Constraint Source #

Methods

(.) :: (Con a, Con b, Con c) => (b -> c) -> (a -> b) -> a -> c Source #

id :: Con a => a -> a Source #

Ring s => Category (Mat s :: (Type -> Type) -> (Type -> Type) -> Type) Source # 
Instance details

Defined in Algebra.Linear

Associated Types

type Con a :: Constraint Source #

Methods

(.) :: (Con a, Con b, Con c) => Mat s b c -> Mat s a b -> Mat s a c Source #

id :: Con a => Mat s a a Source #