-
Notifications
You must be signed in to change notification settings - Fork 21
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
Don't use polysemy-plugin, remove IdempotentLoweringSpec #66
Conversation
@adamConnerSax Can you confirm if this works? I personally have issues trying to get 8.10 working with stack. |
Looks like it. I had to do an "allow-newer: ghc-prim" for my case. Also, I wanted to do "allow-newer: random"--because the newer random is a major performance upgrade--but then I got a compilation error: src/Polysemy/Random.hs:54:8: error:
• Could not deduce: Polysemy.Internal.Union.LocateEffect
(Embed m0) r
~ '()
arising from a use of ‘embed’
from the context: Member (Embed IO) r
bound by the type signature for:
runRandomIO :: forall (r :: [(* -> *) -> * -> *]) a.
Member (Embed IO) r =>
Sem (Random : r) a -> Sem r a
at src/Polysemy/Random.hs:52:1-68
The type variable ‘m0’ is ambiguous
• In a stmt of a 'do' block: q <- embed R.newStdGen
In the expression:
do q <- embed R.newStdGen
snd <$> runRandom q m
In an equation for ‘runRandomIO’:
runRandomIO m
= do q <- embed R.newStdGen
snd <$> runRandom q m
• Relevant bindings include
m :: Sem (Random : r) a (bound at src/Polysemy/Random.hs:53:13)
runRandomIO :: Sem (Random : r) a -> Sem r a
(bound at src/Polysemy/Random.hs:53:1)
|
54 | q <- embed R.newStdGen
| ^^^^^^^^^^^^^^^^^ |
So maybe, while you're there, it's worth bumping all the bounds, or at least all but random, though if that's easy to fix, it might be worth it... |
Anyway, thanks for working on it! |
Does that do it? |
Forgot the tests. Those are significantly more hellish to rewrite, so I'm going with enabling the plugin for the tests only. @adamConnerSax I'll merge this when you confirm this works. |
I’ll test tomorrow AM! |
All works on my end, thanks! |
Stop-gap for #65.
This does not address the underlying bug, so I won't close that issue.
This wasn't as much work as I thought it would be.