FiniteCategories-0.1.0.0: Finite categories and usual categorical constructions on them.
CopyrightGuillaume Sabbagh 2021
LicenseGPL-3
Maintainerguillaumesabbagh@protonmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Diagram.Conversion

Description

Functions to convert all functor types.

Synopsis

Diagram to something

diagramToFinFunctor :: (FiniteCategory c m o, Morphism m o) => Diagram c m o c m o -> FinFunctor c m o Source #

Converts a homogeneous Diagram to a FinFunctor.

diagramToPartialFunctor :: (FiniteCategory c m o, Morphism m o) => Diagram c m o c m o -> PartialFunctor c m o Source #

Converts a homogeneous Diagram to a PartialFunctor

FinFunctor to something

finFunctorToDiagram :: FinFunctor c m o -> Diagram c m o c m o Source #

Converts a FinFunctor into a Diagram.

A FinFunctor is a morphism of the FinCat category, it is a homogeneous FinFunctor. This functions casts it to a heterogeneous FinFunctor (i.e. a Diagram).

finFunctorToPartialFunctor :: (FiniteCategory c m o, Morphism m o) => FinFunctor c m o -> PartialFunctor c m o Source #

Converts a total functor to a partial functor.

PartialFunctor to something

partialFunctorToDiagram :: (FiniteCategory c m o, Morphism m o, Eq m, Eq o, Show o, Show m) => PartialFunctor c m o -> Maybe (Diagram c m o c m o) Source #

Try to convert a PartialFunctor into a Diagram if it can (if it is total).

partialFunctorToFinFunctor :: (FiniteCategory c m o, Morphism m o, Eq m, Eq o, Show o, Show m) => PartialFunctor c m o -> Maybe (FinFunctor c m o) Source #

Try to convert a partial functor to a total functor if it is possible.