The free package

[Tags: bsd3, library]

Free monads are useful for many tree-like structures and domain specific languages.

If f is a Functor then the free Monad on f is the type of trees whose nodes are labeled with the constructors of f. The word "free" is used in the sense of "unrestricted" rather than "zero-cost": Free f makes no constraining assumptions beyond those given by f and the definition of Monad. As used here it is a standard term from the mathematical theory of adjoint functors.

Cofree comonads are dual to free monads. They provide convenient ways to talk about branching streams and rose-trees, and can be used to annotate syntax trees. The cofree comonad can be seen as a stream parameterized by a Functor that controls its branching factor.

More information on free monads, including examples, can be found in the following blog posts: http://comonad.com/reader/2008/monads-for-free/ http://comonad.com/reader/2011/free-monads-for-less/


Properties

Versions0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 1.8.0, 1.8.0.1, 1.8.0.3, 1.8.0.4, 2.0, 2.0.1, 2.0.1.1, 2.0.2, 2.0.3, 2.1, 2.1.1, 2.1.1.1, 2.2, 3.0, 3.1, 3.1.1, 3.2, 3.3, 3.3.0.1, 3.3.0.2, 3.3.1, 3.4, 3.4.1, 3.4.2, 4.0, 4.1, 4.2, 4.4, 4.5, 4.6, 4.6.1, 4.7, 4.7.1, 4.8, 4.8.0.1, 4.9
Dependenciesbase (==4.*), bifunctors (==4.*), comonad (==4.*), distributive (>=0.2.1), either (>=4.1.1), mtl (>=2.0.1.0 && <2.3), prelude-extras (>=0.4 && <1), profunctors (==4.*), semigroupoids (==4.*), semigroups (>=0.8.3.1 && <1), template-haskell (>=2.7.0.0 && <3), transformers (>=0.2.0 && <0.5)
LicenseBSD3
CopyrightCopyright (C) 2008-2013 Edward A. Kmett
AuthorEdward A. Kmett
MaintainerEdward A. Kmett <ekmett@gmail.com>
Stabilityprovisional
CategoryControl, Monads
Home pagehttp://github.com/ekmett/free/
Bug trackerhttp://github.com/ekmett/free/issues
Source repositoryhead: git clone git://github.com/ekmett/free.git
Upload dateFri May 30 08:37:42 UTC 2014
Uploaded byEdwardKmett
DistributionsDebian:4.9, NixOS:4.9
Downloads61141 total (10012 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees