Provides free functors that are adjoint to functors that forget class constraints.
Haskell
Switch branches/tags
Nothing to show
Latest commit 29be08b Feb 24, 2017 @sjoerdvisscher committed on GitHub typo
Permalink
Failed to load latest commit information.
examples v0.7.2 Fixed Traversable instance of `Free c` Feb 20, 2017
src/Data
CHANGELOG v0.7.2 Fixed Traversable instance of `Free c` Feb 20, 2017
LICENSE first commit Jul 23, 2012
README subclasses -> subcategories Apr 16, 2013
Setup.hs
free-functors.cabal v0.7.2 Fixed Traversable instance of `Free c` Feb 20, 2017

README

A free functor is a left adjoint to a forgetful functor. It used to be the case
that the only category that was easy to work with in Haskell was Hask itself, so
there were no interesting forgetful functors.

But the new ConstraintKinds feature of GHC provides an easy way of creating
subcategories of Hask. That brings interesting opportunities for free (and cofree) functors.

The examples directory contains an implementation of non-empty lists as free semigroups,
and automata as free actions. The standard example of free higher order functors is free monads,
and this definition can be found in Data.Functor.HFree.