Copyright | (C) 2013-2016 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | GADTs, TFs, MPTCs |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
The co-Yoneda lemma for presheafs states that f
is naturally isomorphic to
.Coyoneda
f
Synopsis
- data Coyoneda f a where
- liftCoyoneda :: f a -> Coyoneda f a
- lowerCoyoneda :: Contravariant f => Coyoneda f a -> f a
- hoistCoyoneda :: (forall a. f a -> g a) -> Coyoneda f b -> Coyoneda g b
Documentation
A Contravariant
functor (aka presheaf) suitable for Yoneda reduction.
Instances
Contravariant (Coyoneda f) # | |
Representable f => Representable (Coyoneda f) # | |
Adjunction f g => Adjunction (Coyoneda f) (Coyoneda g) # | |
type Rep (Coyoneda f) # | |
Defined in Data.Functor.Contravariant.Coyoneda |
liftCoyoneda :: f a -> Coyoneda f a #
Coyoneda "expansion" of a presheaf
liftCoyoneda
.lowerCoyoneda
≡id
lowerCoyoneda
.liftCoyoneda
≡id
lowerCoyoneda :: Contravariant f => Coyoneda f a -> f a #
Coyoneda reduction on a presheaf
hoistCoyoneda :: (forall a. f a -> g a) -> Coyoneda f b -> Coyoneda g b #
Lift a natural transformation from f
to g
to a natural transformation
from Coyoneda f
to Coyoneda g
.