Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Cocoyoneda
gives a cofree cofunctor for any type constructor.
Documentation
data Cocoyoneda f a where Source #
Cocoyoneda :: (a -> b) -> f a -> Cocoyoneda f b |
Cofunctor (Cocoyoneda f) Source # | |
liftCocoyoneda :: f a -> Cocoyoneda f a Source #
lowerCocoyoneda :: Cofunctor f => Cocoyoneda f a -> f a Source #
hoistCocoyoneda :: (forall a. f a -> g a) -> Cocoyoneda f b -> Cocoyoneda g b Source #