| 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 | None |
| Language | Haskell2010 |
Data.Profunctor.Yoneda
Description
- newtype Yoneda p a b = Yoneda {
- runYoneda :: forall x y. (x -> a) -> (b -> y) -> p x y
- extractYoneda :: Yoneda p a b -> p a b
- duplicateYoneda :: Yoneda p a b -> Yoneda (Yoneda p) a b
- data Coyoneda p a b where
- returnCoyoneda :: p a b -> Coyoneda p a b
- joinCoyoneda :: Coyoneda (Coyoneda p) a b -> Coyoneda p a b
Documentation
This is the cofree profunctor given a data constructor of kind * -> * -> *
Instances
| ProfunctorComonad Yoneda Source # | |
| ProfunctorMonad Yoneda Source # | |
| ProfunctorFunctor Yoneda Source # | |
| Profunctor (Yoneda p) Source # | |
| Costrong p => Costrong (Yoneda p) Source # | |
| Strong p => Strong (Yoneda p) Source # | |
| Cochoice p => Cochoice (Yoneda p) Source # | |
| Choice p => Choice (Yoneda p) Source # | |
| Closed p => Closed (Yoneda p) Source # | |
| Traversing p => Traversing (Yoneda p) Source # | |
| Mapping p => Mapping (Yoneda p) Source # | |
| (Category * p, Profunctor p) => Category * (Yoneda p) Source # | |
| Functor (Yoneda p a) Source # | |
extractYoneda :: Yoneda p a b -> p a b Source #
data Coyoneda p a b where Source #
Instances
| ProfunctorComonad Coyoneda Source # | |
| ProfunctorMonad Coyoneda Source # | |
| ProfunctorFunctor Coyoneda Source # | |
| Profunctor (Coyoneda p) Source # | |
| Costrong p => Costrong (Coyoneda p) Source # | |
| Strong p => Strong (Coyoneda p) Source # | |
| Cochoice p => Cochoice (Coyoneda p) Source # | |
| Choice p => Choice (Coyoneda p) Source # | |
| Closed p => Closed (Coyoneda p) Source # | |
| Traversing p => Traversing (Coyoneda p) Source # | |
| Mapping p => Mapping (Coyoneda p) Source # | |
| (Category * p, Profunctor p) => Category * (Coyoneda p) Source # | |
returnCoyoneda :: p a b -> Coyoneda p a b Source #