Copyright | (C) 2017 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | provisional |
Portability | Rank2Types, TFs |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Synopsis
- newtype Yoneda (p :: Type -> Type -> Type) a b = Yoneda {
- runYoneda :: forall x y. (x -> a) -> (b -> y) -> p x y
- extractYoneda :: Yoneda p a b -> p a b
- duplicateYoneda :: forall (p :: Type -> Type -> Type) a b. Yoneda p a b -> Yoneda (Yoneda p) a b
- data Coyoneda (p :: Type -> Type -> Type) a b where
- returnCoyoneda :: p a b -> Coyoneda p a b
- joinCoyoneda :: forall (p :: Type -> Type -> Type) a b. Coyoneda (Coyoneda p) a b -> Coyoneda p a b
Documentation
newtype Yoneda (p :: Type -> Type -> Type) a b Source #
This is the cofree profunctor given a data constructor of kind * -> * -> *
Instances
extractYoneda :: Yoneda p a b -> p a b Source #
duplicateYoneda :: forall (p :: Type -> Type -> Type) a b. Yoneda p a b -> Yoneda (Yoneda p) a b Source #
data Coyoneda (p :: Type -> Type -> Type) a b where Source #
Coyoneda :: forall a x y b (p :: Type -> Type -> Type). (a -> x) -> (y -> b) -> p x y -> Coyoneda p a b |
Instances
returnCoyoneda :: p a b -> Coyoneda p a b Source #