free-functors-0: Provides free functors that are adjoint to functors that forget class constraints.

Portabilitynon-portable
Stabilityexperimental
Maintainersjoerd@w3future.com
Safe HaskellSafe-Infered

Data.Functor.Cofree

Description

A cofree functor is right adjoint to a forgetful functor. In this package the forgetful functor forgets class constraints.

Synopsis

Documentation

data Cofree c b whereSource

The cofree functor for constraint c.

Constructors

Cofree :: c a => (a -> b) -> a -> Cofree c b 

Instances

leftAdjunct :: c a => (a -> b) -> a -> Cofree c bSource

rightAdjunct :: (a -> Cofree c b) -> a -> bSource

leftAdjunct' :: ForallF c f => (f a -> b) -> f a -> Cofree c bSource

convert :: (c (w a), Comonad w) => w a -> Cofree c aSource