Monads for free
79.03 KB
built 2026-10-14 00:20:43 GMT
Description
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: <https://ekmett.github.io/reader/2008/monads-for-free/>
<https://ekmett.github.io/reader/2011/free-monads-for-less/>.
Dependencies
20 totalRequires18
- dos2unix
- ghc-Cabal-devel
- ghc-base-devel
- ghc-comonad-devel
- ghc-containers-devel
- ghc-distributive-devel
- ghc-exceptions-devel
- ghc-indexed-traversable-devel
- ghc-mtl-devel
- ghc-profunctors-devel
- ghc-rpm-macros
- ghc-semigroupoids-devel
- ghc-template-haskell-devel
- ghc-th-abstraction-devel
- ghc-transformers-base-devel
- ghc-transformers-devel
- rpmlib(CompressedFileNames) <= 3.0.4-1
- rpmlib(FileDigests) <= 4.6.0-1
Provides2
- ghc-free = 5.2-9.fc45
- ghc-free-devel = 5.2-9.fc45
ObsoletesNo Obsoletes
ConflictsNo Conflicts
RecommendsNo Recommends
SuggestsNo Suggests
SupplementsNo Supplements
EnhancesNo Enhances
Files
3Name ![]() |
Size |
|---|---|
| free-5.2.cabal | 4.08 KB |
| free-5.2.tar.gz | 57.40 KB |
| ghc-free.spec | 9.54 KB |
Files 1–3 of 3
Component of
buildroots that installed this RPMNo Buildroots
