Closed isovector closed 7 years ago
Thanks!
Can we generalize this so that an effect can be implemented using multiple intermediary effects?
@liskin I’ve been looking into that a little bit. It’s possible, but it’s currently difficult for GHC to infer, and it requires use of type application or extremely verbose annotation. However, I think with generalized support for injective type families, tracked in GHC ticket #10832, it could be implemented without breaking type inference.
We've found certain interpreters that want to be implemented in terms of other interpreters; however, if those interpreters themselves have
Member
constraints, they will leak out into the type signature.replaceRelay
allows us to rewrite the head of the effects in terms of some other effect which need not exist in the effect list. This lets us get around the above issue, and provide leakless abstractions for interpreters.