data-category-0.1.0: Restricted categories

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com

Data.Category.Alg

Description

Alg(F), the category of F-algebras and F-homomorphisms.

Synopsis

Documentation

newtype Algebra f a Source

Objects of Alg(F) are F-algebras.

Constructors

Algebra (Dom f (F f a) a) 

Instances

(Dom f ~ ~>, Cod f ~ ~>, CategoryO ~> a) => CategoryO (Alg f) (Algebra f a) 
(Dom f ~ ~>, Cod f ~ ~>, CategoryA ~> a b c) => CategoryA (Alg f) (Algebra f a) (Algebra f b) (Algebra f c) 

data family Alg f a b :: *Source

Arrows of Alg(F) are F-homomorphisms.

type InitialFAlgebra f = InitialObject (Alg f)Source

The initial F-algebra is the initial object in the category of F-algebras.

type Cata f a = Algebra f a -> Alg f (InitialFAlgebra f) (Algebra f a)Source

A catamorphism of an F-algebra is the arrow to it from the initial F-algebra.

newtype FixF f Source

FixF provides the initial F-algebra for endofunctors in Hask.

Constructors

InF 

Fields

outF :: f (FixF f)
 

cataHask :: Functor f => Cata (EndoHask f) aSource

Catamorphisms for endofunctors in Hask.