The extensible-effects package

[Tags:library, mit, test]

This package introduces datatypes for typeclass-constrained effects, as an alternative to monad-transformer based (datatype-constrained) approach of multi-layered effects. For more information, see the original paper at Any help is appreciated!

[Skip to Readme]


Versions 1.0, 1.1.0, 1.2.0, 1.2.1, 1.4.1, 1.5.0, 1.6.0, 1.7.1,,,,,,,,,,,,,,,, (info)
Dependencies base (>=4.6 && <5), transformers (>=0.3 && <0.6), transformers-base (==0.4.*), type-aligned (>=0.9.3), void (>=0.6 && <0.8) [details]
License MIT
Author Oleg Kiselyov, Amr Sabry, Cameron Swords, Ben Foppa
Category Control, Effect
Home page
Source repository head: git clone
Uploaded Fri May 27 02:18:47 UTC 2016 by shergill
Distributions LTSHaskell:, NixOS:, Stackage:, Tumbleweed:
Downloads 5079 total (216 in the last 30 days)
2 []
Status Docs available [build log]
Last success reported on 2016-05-27 [all 1 reports]
Hackage Matrix CI





Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

For package maintainers and hackage trustees

Readme for extensible-effects

Readme for extensible-effects-

extensible-effects is based on the work Extensible Effects: An Alternative to Monad Transformers. Please read the paper for details.

Build Status Join the chat at <a href=""></a>


  • Effects can be added, removed, and interwoven without changes to code not dealing with those effects.


For GHC version 7.8 and upwards

  • The extensibility comes at the cost of some ambiguity. Note, however, that the extensibility can be traded back, but that detracts from some of the advantages. For details see section 4.1 in the paper. This issue manifests itself in a few ways:
    • Common functions can't be grouped using typeclasses, e.g. the ask and getState functions can't be grouped with some

      class Get t a where
        ask :: Member (t a) r => Eff r a

      ask is inherently ambiguous, since the type signature only provides a constraint on t, and nothing more. To specify fully, a parameter involving the type t would need to be added, which would defeat the point of having the grouping in the first place.

    • Code requires greater number of type annotations. For details see #31.

  • Requires a Typeable instance on the return type. This is no longer a limitation on GHC versions 7.8 and above.
    • fixed by #38.

For GHC versions prior to 7.8

  • Neither Eff nor (:>) has a Typeable instance, and can thus often not be used as a return type (e.g. State type) for other Effs.
    • fixed by #38.