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

[ bsd3, data, library, math ] [ Propose Tags ]
Versions 0, 0.1, 0.1.1, 0.1.2, 0.2, 0.3, 0.4, 0.4.1, 0.5, 0.6, 0.6.1,, 0.6.2, 0.6.3,,,, 0.6.4,, 0.6.5, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.8.2, 0.8.3, 0.8.4
Dependencies base (>=4.4 && <5), comonad (==3.0.*), constraints (>=0.3.2 && <0.4), transformers (>= && <0.4) [details]
License BSD-3-Clause
Author Sjoerd Visscher
Category Data, Math
Home page
Bug tracker
Source repo head: git clone git://
Uploaded by SjoerdVisscher at Mon Jul 23 22:46:55 UTC 2012
Distributions NixOS:0.8.4
Downloads 7687 total (144 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

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 subclasses 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.




Maintainer's Corner

For package maintainers and hackage trustees