Experimental, user-contributed effects and interpreters for polysemy


Version on this page:
LTS Haskell 20.26:
Stackage Nightly 2022-11-17:
Latest on Hackage:

See all snapshots polysemy-zoo appears in

BSD-3-Clause licensed by Sandy Maguire
Maintained by [email protected]
This version can be pinned in stack with:polysemy-zoo-,3575

Module documentation for

  • Polysemy
    • Polysemy.Alias
    • Polysemy.Capture
    • Polysemy.ConstraintAbsorber
      • Polysemy.ConstraintAbsorber.MonadError
      • Polysemy.ConstraintAbsorber.MonadReader
      • Polysemy.ConstraintAbsorber.MonadState
      • Polysemy.ConstraintAbsorber.MonadWriter
    • Polysemy.Cont
      • Polysemy.Cont.Internal
    • Polysemy.Final
      • Polysemy.Final.Async
      • Polysemy.Final.Error
      • Polysemy.Final.Fixpoint
      • Polysemy.Final.MTL
      • Polysemy.Final.Resource
    • Polysemy.Floodgate
    • Polysemy.IdempotentLowering
    • Polysemy.KVStore
    • Polysemy.Operators
    • Polysemy.Random
    • Polysemy.Redis
      • Polysemy.Redis.Utils
    • Polysemy.SetStore
    • Polysemy.Several
    • Polysemy.Shift
      • Polysemy.Shift.Internal


Build Status Hackage


Once I was chased by the king of all scorpions.

Rachel Hunter


The polysemy-zoo is an experimental repository for user-contributed additions to the polysemy ecosystem. You’re encouraged to open Pull Requests here for any effects/interpretations that you write and think might be useful for others.

Particularly successful contributions here will be migrated into either polysemy proper, or polysemy-contrib (the less experimental version of the zoo.)

Polysemy in the Wild

The Zoo isn’t the only place to find great user-contributions to polysemy! Here is a curated list of other great effects and interops:


Changelog for polysemy-zoo (2019-07-25)

  • Fixed some bugs with haddock (2019-07-24)

  • Added Continuation effects (thanks to @KingoftheHomeless)
  • Update to polysemy-’s new names (2019-07-10)

  • Fixed an erroneous lower bound in the tests (2019-07-10)

Breaking Changes

  • The semantics of absorbWriter are now aligned with the MTL implementation

New Effects and Interpreters

  • Added SetStore effect
  • Added Floodgate effect
  • Added Final effect, together with submodules of interpreters using it (thanks to @KingoftheHomeless)
  • Added lookupOrThrowKV, existsKV and modifyKV actions to KVStore
  • Added Redis interpretations of SetStore and KVStore (2019-06-17)

  • Removed Polysemy.MTL
  • The machinery for MTL absorption is now monomorphized in Polysemy.ConstraintAbsorber. See the documentation there and in submodules for more information. (2019-06-14)

  • Removed Polysemy.RandomFu, which is moving to its own package
  • Add explicit cabal bounds for dependencies of polysemy-zoo (2019-06-12)

  • Update the tests to run against polysemy- (2019-06-01)

  • Added Polysemy.MTL for inter-op with MTL (thanks to @adamConnerSax)
  • Moved Polysemy.Random from polysemy
  • Added Polysemy.RandomFu (thanks to @adamConnerSax)
  • Added fixedNat and fixedNat' to Polysemy.IdempotentLowering for working with higher-order effects. (2019-05-22)

  • Added Polysemy.IdempotentLowering

Unreleased changes