Skip to content
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

Merged
merged 5 commits into from
Sep 28, 2020

Conversation

KingoftheHomeless
Copy link
Collaborator

@KingoftheHomeless KingoftheHomeless commented Sep 27, 2020

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.

@KingoftheHomeless
Copy link
Collaborator Author

@adamConnerSax Can you confirm if this works? I personally have issues trying to get 8.10 working with stack.

@adamConnerSax
Copy link
Contributor

adamConnerSax commented Sep 27, 2020

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
   |        ^^^^^^^^^^^^^^^^^

@adamConnerSax
Copy link
Contributor

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...

@adamConnerSax
Copy link
Contributor

Anyway, thanks for working on it!

@KingoftheHomeless
Copy link
Collaborator Author

Does that do it?

@KingoftheHomeless KingoftheHomeless changed the title Don't use polysemy-plugin Don't use polysemy-plugin, remove IdempotentLoweringSpec Sep 27, 2020
@KingoftheHomeless
Copy link
Collaborator Author

Forgot the tests. Those are significantly more hellish to rewrite, so I'm going with enabling the plugin for the tests only.
Also, for some reason Travis now trips up on building IdempotentLoweringSpec, compared to in February. I have no idea why. Considering Idempotent Lowering has long since been de-facto deprecated in favour of Final, and ImpredicativeTypes has unspecified behaviour, I'll simply be removing that test, and not lose any sleep over it.

@adamConnerSax I'll merge this when you confirm this works.

@adamConnerSax
Copy link
Contributor

I’ll test tomorrow AM!

@adamConnerSax
Copy link
Contributor

All works on my end, thanks!

@KingoftheHomeless KingoftheHomeless merged commit ac99fdc into master Sep 28, 2020
@KingoftheHomeless KingoftheHomeless deleted the no-plugin branch September 28, 2020 14:46
@funketh funketh mentioned this pull request Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants