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
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 #