Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
A Cocomplete category is one which has all small colimits. This module provides a signature for such colimits and a default implementation of pushouts based on coequalizers and coproducts.
- class Morphism m => Cocomplete m where
Documentation
class Morphism m => Cocomplete m where Source #
Type class for morphisms whose category is Cocomplete.
Mainly provides categorical operations that Cocomplete categories are guaranteed to have.
Note that for performance reasons, verigraph assumes that the parameters are valid for all functions in this module.
calculateCoequalizer :: m -> m -> m Source #
Given two morphisms f : A -> B
and g : A -> B
retuns the coequalizer morphism
h : B -> X
calculateNCoequalizer :: NonEmpty m -> m Source #
Given a non-empty list of morphisms of the form f : A -> B
returns the coequalizer Morphism
h : B -> X
calculateCoproduct :: Obj m -> Obj m -> (m, m) Source #
Given two objects A
and B
it returns the coproduct (A+B, f: A -> A+B, g: B -> A+B)
calculateNCoproduct :: NonEmpty (Obj m) -> [m] Source #
Given a non-empty list of objects Bi
it returns the coproduct fi : Bi -> SUM(Bi)
initialObject :: m -> Obj m Source #
calculatePushout :: m -> m -> (m, m) Source #