data-category-0.6.0: Category theory

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com
Safe HaskellSafe-Inferred

Data.Category.Yoneda

Description

 

Synopsis

Documentation

type YonedaEmbedding k = Postcompose (Hom k) (Op k) :.: (Postcompose (Swap k (Op k)) (Op k) :.: Tuple k (Op k))Source

yonedaEmbedding :: Category k => YonedaEmbedding kSource

The Yoneda embedding functor, C -> Set^(C^op).

data Yoneda k f Source

Constructors

Yoneda 

Instances

(Category k, Functor f, ~ (* -> * -> *) (Dom f) (Op k), ~ (* -> * -> *) (Cod f) (->)) => Functor (Yoneda k f)

Yoneda converts a functor f into a natural transformation from the hom functor to f.

fromYoneda :: (Category k, Functor f, Dom f ~ Op k, Cod f ~ (->)) => f -> Yoneda k f :~> fSource

fromYoneda and toYoneda are together the isomophism from the Yoneda lemma.

toYoneda :: (Category k, Functor f, Dom f ~ Op k, Cod f ~ (->)) => f -> f :~> Yoneda k fSource