# free

> Free monads, free applicatives and cofree comonads for Haskell

Source: https://talira.ai/catalog/free-5m97g7eh
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / functional programming](https://talira.ai/categories/libraries/functional-programming), [languages / haskell](https://talira.ai/categories/languages/haskell)
- Licence: BSD-3-Clause[^1][^2]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Edward Kmett](https://talira.ai/orgs/edward-kmett.md)

free is a Haskell package of common definitions for working with free monads, free applicatives and cofree comonads. The free monad on a functor is the type of trees whose nodes are labeled with that functor's constructors, useful for tree-like structures and domain-specific languages; cofree comonads, its dual, describe branching streams and rose trees and can annotate syntax trees.

## Links

- GitHub: https://github.com/ekmett/free
- Docs: https://hackage.haskell.org/package/free

## Problems it solves

- build an embedded DSL with an interpreter in Haskell
- separate a program's description from how it runs in Haskell
- use a free monad over my own functor in Haskell

## Features

- free monads over any Functor
- free applicatives
- cofree comonads for branching streams, rose trees and annotated syntax trees
- building blocks for domain-specific languages

## Trust

Overall: 0.31 out of 1.
Signals: maintenance 0.27, adoption 0.46, momentum 0.09, community 0.71, backing 0.30, extensibility 0.00.

- 191 GitHub stars
- 60 contributors
- backed by Edward Kmett

Warnings:

- last commit 10 months ago

## Alternatives

- [semigroupoids](https://talira.ai/catalog/semigroupoids-tq3kzmpx.md): id-free versions of Haskell's Category, Applicative, Monad and related type classes
- [transformers](https://talira.ai/catalog/transformers-tkbnymgd.md): Concrete functor and monad transformers for Haskell
- [adjunctions](https://talira.ai/catalog/adjunctions-7ydbnyw1.md): Adjunctions and representable functors for Haskell

## Sources

[^1]: https://github.com/ekmett/free/blob/master/free.cabal (checked 28 Nov 2026)
[^2]: https://github.com/ekmett/free/blob/master/LICENSE (checked 28 Nov 2026)
