[ANN] cleff - fast and concise extensible effects

I’m pleased to announce cleff, a new extensible effects library for Haskell: https://github.com/re-xyr/cleff.

It has several key features that distinguishes it from other libraries:

  • It has an API similar to polysemy and freer-simple, i.e. you can write effect interpreters as simple case-splitting functions. This means effects are low-boilerplate, easy to understand, and that users of similar libraries can easily get along with cleff.
  • It supports higher-order effects implementation, and provides a set of easy-to-use combinators for that. The expressiveness of these combinators are on par with polysemy's Tactics language, and also harder to use incorrectly.
  • It uses a ReaderT IO monad as the underlying Eff monad implementation, instead of free monads.
    • Therefore, the overhead of effects is reduced greatly (and gives pretty impressive microbenchmark results).
    • IO-based effect implementations provides good interaction with exceptions and concurrency (no more losing changes to State due to exceptions).

The library and documentation are already available on Hackage: https://hackage.haskell.org/package/cleff.