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 |
Synopsis
- newtype Yoneda (f :: Type -> Type) a = Yoneda {
- runYoneda :: forall r. (r -> a) -> f r
- liftYoneda :: Contravariant f => f a -> Yoneda f a
- lowerYoneda :: Yoneda f a -> f a
Documentation
newtype Yoneda (f :: Type -> Type) a Source #
Yoneda embedding for a presheaf
Instances
Representable f => Representable (Yoneda f) Source # | |
Defined in Data.Functor.Contravariant.Yoneda | |
Contravariant (Yoneda f) Source # | |
Adjunction f g => Adjunction (Yoneda f) (Yoneda g) Source # | |
type Rep (Yoneda f) Source # | |
Defined in Data.Functor.Contravariant.Yoneda |
liftYoneda :: Contravariant f => f a -> Yoneda f a Source #
liftYoneda
.lowerYoneda
≡id
lowerYoneda
.liftYoneda
≡id
lowerYoneda :: Yoneda f a -> f a Source #