category-extras-0.51.3: Various modules and constructs inspired by category theory
Control.Functor.Yoneda
Description
The Yoneda lemma materialized as a Kan extension, and hence as a higher order functor
type Yoneda = Ran IdentitySource
toYoneda :: Functor f => f :~> Yoneda fSource
fromYoneda :: Yoneda f :~> fSource