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 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 # | |
Defined in Data.Profunctor.Yoneda proextract :: Profunctor p => Yoneda p :-> p # produplicate :: Profunctor p => Yoneda p :-> Yoneda (Yoneda p) # | |
ProfunctorMonad Yoneda # | |
Defined in Data.Profunctor.Yoneda | |
ProfunctorFunctor Yoneda # | |
Defined in Data.Profunctor.Yoneda | |
Profunctor (Yoneda p) # | |
Defined in Data.Profunctor.Yoneda | |
Costrong p => Costrong (Yoneda p) # | |
Strong p => Strong (Yoneda p) # | |
Closed p => Closed (Yoneda p) # | |
Defined in Data.Profunctor.Yoneda | |
Cochoice p => Cochoice (Yoneda p) # | |
Choice p => Choice (Yoneda p) # | |
Traversing p => Traversing (Yoneda p) # | |
Defined in Data.Profunctor.Yoneda | |
Mapping p => Mapping (Yoneda p) # | |
(Category p, Profunctor p) => Category (Yoneda p :: Type -> Type -> Type) # | |
Functor (Yoneda p a) # | |
extractYoneda :: Yoneda p a b -> p a b #
duplicateYoneda :: Yoneda p a b -> Yoneda (Yoneda p) a b #
Instances
returnCoyoneda :: p a b -> Coyoneda p a b #
joinCoyoneda :: Coyoneda (Coyoneda p) a b -> Coyoneda p a b #