Free monads and monad transformers. This package is not under active development. Instead, I recommend the excellent free package.