category-extras-0.53.4: Various modules and constructs inspired by category theory

Portabilityportable
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>

Control.Allegory

Description

Allegories are generalizations of categories to cover relations.

Documentation

class Category k => Allegory k whereSource

Methods

(.<=.) :: k a b -> k a b -> BoolSource

meet :: k a b -> k a b -> k a bSource

converse :: k a b -> k b aSource

isSimple :: k a b -> BoolSource

isTotal :: k a b -> BoolSource

isMap :: k a b -> BoolSource

class Allegory k => TabulatedAllegory k f whereSource

Methods

tabulateLeft :: k a b -> k a (f a b)Source

tabulateRight :: k a b -> k b (f a b)Source

class Allegory k => UnitalAllegory k i | k -> i whereSource

Methods

all :: k a iSource

rightDomain :: k b a -> k b bSource

leftDomain :: k b a -> k a aSource

class (Allegory k1, Allegory k2, CFunctor f k1 k2) => Relator f k1 k2 Source

data Map k a b Source

Constructors

Map 

Fields

runMap :: k a b
 

Instances

Allegory k => Category (Map k) 

extractMap :: Allegory k => k a b -> Maybe (Map k a b)Source