Portability | non-portable |
---|---|

Stability | experimental |

Maintainer | sjoerd@w3future.com |

Safe Haskell | Safe-Inferred |

A free functor is left adjoint to a forgetful functor. In this package the forgetful functor forgets class constraints.

Compared to `Data.Functor.Free`

we're going up a level.
These free functors go between categories of functors and the natural
transformations between them.

- type :~> f g = forall b. f b -> g b
- newtype HFree c f a = HFree {}
- unit :: f :~> HFree c f
- rightAdjunct :: (c g, Functor g) => (f :~> g) -> HFree c f :~> g
- counit :: (c f, Functor f) => HFree c f :~> f
- leftAdjunct :: (HFree c f :~> g) -> f :~> g
- hfmap :: (f :~> g) -> HFree c f :~> HFree c g
- liftFree :: f a -> HFree c f a
- lowerFree :: (c f, Functor f) => HFree c f a -> f a
- convert :: (c (t f), Functor (t f), Monad f, MonadTrans t) => HFree c f a -> t f a
- iter :: c Identity => (forall b. f b -> b) -> HFree c f a -> a
- wrap :: f (HFree Monad f a) -> HFree Monad f a

# Documentation

The higher order free functor for constraint `c`

.

Monad (HFree Monad f) | The free monad of a functor. |

Functor (HFree c f) | |

Applicative (HFree Applicative f) | |

Applicative (HFree Alternative f) | |

Alternative (HFree Alternative f) |

leftAdjunct :: (HFree c f :~> g) -> f :~> gSource

leftAdjunct f = f . unit