-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transitivity of Members #315
Comments
It won't - it would be potentially possible if |
Ah. Thanks! That makes sense. Would it be possible to have both? To define a class and then warn that it's possibly less optimal? Just for use in cases like this. I'll think about it, I guess. |
It should be possible, but I would rather not duplicate interface in this way. We need to solve this properly. It is a relevant issue for sure though - let's keep it open for now. |
This would be a really handy thing to have for dealing with On a similar topic it would be nice for It should be possible to conjure up this witness if one had a singleton of the effect list or (equivalently) some |
I looked into doing this tonight, but it's unclear how exactly. The problem is today we assume class Members (es :: EffectRow) (r :: EffectRow)
instance (Members es r, Member e r) => Members (e : es) r
instance Members '[] r which compiles, except that now we can't go from |
I know a question like this has been asked before but I think I have a different version. Maybe.
The basic question is should a context of
Members es r
allow GHC to deduce
Members es (Eff0 ': r)
I would think it would. But I'm running into something where that seems to fail.
From reading through the last time this was asked, I imagine I may just be doing something silly.
I'm trying to pass around a thing, which is, more or less,
that has, as a type parameter, a list of effects that need to be available for it to be "run". That's the
es
in the above. It works, as in, I can run it, withBut if I try to hand t off to a different function, running in a larger stack:
I get an error like the above. In my case, I can get around it by making the stacks the same but I'm confused...
The text was updated successfully, but these errors were encountered: