@hackage free3.1.1

Monads for free

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

A Monad n is a free Monad for f if every Monad homomorphism from n to another monad m is equivalent to a natural transformation from f to m.

Cofree comonads provide convenient ways to talk about branching streams and rose-trees, and can be used to annotate syntax trees.

A Comonad v is a cofree Comonad for f if every Comonad homomorphism another comonad w to v is equivalent to a natural transformation from w to f.