An Alternative to Monad Transformers
|Version on this page:||22.214.171.124|
|LTS Haskell 20.23:||126.96.36.199@rev:1|
|Stackage Nightly 2023-05-31:||188.8.131.52@rev:1|
|Latest on Hackage:||184.108.40.206@rev:1|
Maintained by email@example.com
This version can be pinned in stack with:
Module documentation for 220.127.116.11
Depends on 5 packages(full list with versions):
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.
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
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.
Code requires greater number of type annotations. For details see #31.
- Requires a
Typeableinstance 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
Typeableinstance, and can thus often not be used as a return type (e.g.
Statetype) for other
- fixed by #38.