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

polysemy-zoo 0.1.1.0 test failure #4572

Closed
alexeyzab opened this issue May 23, 2019 · 5 comments
Closed

polysemy-zoo 0.1.1.0 test failure #4572

alexeyzab opened this issue May 23, 2019 · 5 comments

Comments

@alexeyzab
Copy link
Contributor

Building test suite 'polysemy-zoo-test' for polysemy-zoo-0.1.1.0..
[1 of 4] Compiling IdempotentLoweringSpec ( test/IdempotentLoweringSpec.hs, dist/build/polysemy-zoo-test/polysemy-zoo-test-tmp/IdempotentLoweringSpec.o )

test/IdempotentLoweringSpec.hs:36:21: error:
    • Could not deduce: (Member Resource '[State Int, State s0,
                                           Lift IO])
      Fix:
        add (Member Resource '[State Int, State s0,
                               Lift IO]) to the context of
          the type signature
    • In the first argument of ‘runIt’, namely ‘test’
      In a stmt of a 'do' block: result <- runIt test
      In the second argument of ‘($)’, namely
        ‘do runIt <- nat runM .@! const (runStateInIO 0)
                       .@! liftNat runResource
            result <- runIt test
            result `shouldBe` (3 :: Int)’
   |
36 |     result <- runIt test
   |                     ^^^^

test/IdempotentLoweringSpec.hs:36:21: error:
    • Unhandled effect 'Resource'
      Probable fix:
        add an interpretation for 'Resource'
        If you are looking for inspiration, try consulting
          the documentation for module 'Polysemy.Resource'
    • In the first argument of ‘runIt’, namely ‘test’
      In a stmt of a 'do' block: result <- runIt test
      In the second argument of ‘($)’, namely
        ‘do runIt <- nat runM .@! const (runStateInIO 0)
                       .@! liftNat runResource
            result <- runIt test
            result `shouldBe` (3 :: Int)’
   |
36 |     result <- runIt test
   |                     ^^^^

cc @isovector

@isovector
Copy link
Contributor

Sorry for the churn here. But I'm not sure what's going on here because it works for me.

This looks a lot like the Polysemy.Plugin isn't being loaded. Can you give me some repro steps that involve where you fetched the package from?

@alexeyzab
Copy link
Contributor Author

Here's how I was able to reproduce it locally:

stack unpack polysemy-zoo-0.1.1.0
cd polysemy-zoo-0.1.1.0
stack init --resolver nightly
stack test

@isovector
Copy link
Contributor

Ok, I can repro, thanks. Looking into it!

@isovector
Copy link
Contributor

isovector commented May 23, 2019

@alexeyzab I just released polysemy-plugin-0.2.0.0 on hackage, which should fix this. I think we're good to revert 8c845ad

@alexeyzab
Copy link
Contributor Author

@isovector Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants