| 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
Synopsis
- 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 # | |
Methods proextract :: Profunctor p => Yoneda p :-> p Source # produplicate :: Profunctor p => Yoneda p :-> Yoneda (Yoneda p) Source # | |
| ProfunctorMonad Yoneda Source # | |
| ProfunctorFunctor Yoneda Source # | |
| Profunctor (Yoneda p) Source # | |
Methods dimap :: (a -> b) -> (c -> d) -> Yoneda p b c -> Yoneda p a d Source # lmap :: (a -> b) -> Yoneda p b c -> Yoneda p a c Source # rmap :: (b -> c) -> Yoneda p a b -> Yoneda p a c Source # (#.) :: Coercible c b => (b -> c) -> Yoneda p a b -> Yoneda p a c Source # (.#) :: Coercible b a => Yoneda p b c -> (a -> b) -> Yoneda p a c Source # | |
| Costrong p => Costrong (Yoneda p) Source # | |
| Strong p => Strong (Yoneda p) Source # | |
| Closed p => Closed (Yoneda p) Source # | |
| Cochoice p => Cochoice (Yoneda p) Source # | |
| Choice p => Choice (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
returnCoyoneda :: p a b -> Coyoneda p a b Source #