项目作者: sjoerdvisscher

项目描述 :
Provides free functors that are adjoint to functors that forget class constraints.
高级语言: Haskell
项目地址: git://github.com/sjoerdvisscher/free-functors.git
创建时间: 2012-07-23T21:08:55Z
项目社区:https://github.com/sjoerdvisscher/free-functors

开源协议:Other

下载


free-functors

Hackage Build Status

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.