acme-cofunctor-0.1.1.0: A Cofunctor is a structure from category theory dual to Functor

Safe HaskellSafe
LanguageHaskell98

Data.Cofunctor.Cocoyoneda

Description

Cocoyoneda gives a cofree cofunctor for any type constructor.

Documentation

data Cocoyoneda f a where Source #

Constructors

Cocoyoneda :: (a -> b) -> f a -> Cocoyoneda f b 

Instances

Cofunctor (Cocoyoneda f) Source # 

Methods

cofmap :: (b -> a) -> Cocoyoneda f b -> Cocoyoneda f a Source #

hoistCocoyoneda :: (forall a. f a -> g a) -> Cocoyoneda f b -> Cocoyoneda g b Source #