extensible-effects is based on the work Extensible Effects: An Alternative to Monad Transformers. Please read the paper for details.
- Effects can be added, removed, and interwoven without changes to code not dealing with those effects.
Common functions can't be grouped using typeclasses, e.g. the
getStatefunctions can't be grouped with some
class Get t a where ask :: Member (t a) r => Eff r a
askis inherently ambiguous, since the type signature only provides a constraint on
t, and nothing more. To specify fully, a parameter involving the type
twould need to be added, which would defeat the point of having the grouping in the first place.
Typeableinstance on the return type. This is no longer a limitation on GHC versions 7.8 and above.
Typeableinstance, and can thus often not be used as a return type (e.g.
Statetype) for other
Effs. This is no longer a concern for GHC versions 7.8 and above.