free: Monads for free
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
Warnings:
- Packages relying on Cabal 1.12 or later should specify a version range of the form 'cabal-version: x.y'. Use 'cabal-version: 1.18'.
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/
[Skip to Readme]
Properties
Versions | 0.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, 4.10.0.1, 4.11, 4.12, 4.12.1, 4.12.2, 4.12.3, 4.12.4, 5, 5.0.1, 5.0.2, 5.0.2, 5.1, 5.1.1, 5.1.2, 5.1.3, 5.1.4, 5.1.5, 5.1.6, 5.1.7, 5.1.8, 5.1.9, 5.1.10, 5.2 |
---|---|
Change log | CHANGELOG.markdown |
Dependencies | base (>=4 && <5), bifunctors (>=4 && <6), comonad (>=4 && <6), containers (<0.6), distributive (>=0.2.1), exceptions (>=0.6 && <0.11), fail (>=4.9 && <4.10), mtl (>=2.0.1.0 && <2.3), profunctors (>=4 && <6), semigroupoids (>=4 && <6), semigroups (>=0.8.3.1 && <1), template-haskell (>=2.7.0.0 && <3), transformers (>=0.2.0 && <0.6), transformers-base (<0.5), transformers-compat (>=0.3 && <1) [details] |
License | BSD-3-Clause |
Copyright | Copyright (C) 2008-2015 Edward A. Kmett |
Author | Edward A. Kmett |
Maintainer | Edward A. Kmett <ekmett@gmail.com> |
Category | Control, Monads |
Home page | http://github.com/ekmett/free/ |
Bug tracker | http://github.com/ekmett/free/issues |
Source repo | head: git clone git://github.com/ekmett/free.git |
Uploaded | by JohnWiegley at 2018-04-25T21:45:18Z |
Modules
[Index]
- Control
- Alternative
- Applicative
- Comonad
- Monad
Downloads
- free-5.0.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees