polysemy-research / polysemy-zoo

:monkey::panda_face: Experimental, user-contributed effects and interpreters for polysemy
BSD 3-Clause "New" or "Revised" License
70 stars 21 forks source link

polysemy-zoo-0.1.2.0 test suite build failure #21

Closed DanBurton closed 5 years ago

DanBurton commented 5 years ago

As seen on the Stackage build server:

[3 of 6] Compiling MTLSpec          ( test/MTLSpec.hs, dist/build/polysemy-zoo-test/polysemy-zoo-test-tmp/MTLSpec.o )

test/MTLSpec.hs:74:11: error:
    • Ambiguous use of effect 'Writer'
      Possible fix:
        add (Member (Writer [a0]) '[Writer [Int]]) to the context of
          the type signature
      If you already have the constraint you want, instead
        add a type application to specify
          '[a0]' directly, or activate polysemy-plugin which
            can usually infer the type correctly.
    • In a stmt of a 'do' block: tell [1]
      In the second argument of ‘($)’, namely
        ‘do tell [1]
            absorbWriter $ replicateTell 2 5
            censor init $ absorbWriter $ replicateTell 2 5’
      In a stmt of a 'do' block:
        flip shouldBe 16 . sum . fst . run . runWriter
          $ do tell [1]
               absorbWriter $ replicateTell 2 5
               censor init $ absorbWriter $ replicateTell 2 5
   |
74 |           tell [1]
   |           ^^^^^^^^

test/MTLSpec.hs:76:11: error:
    • Ambiguous use of effect 'Writer'
      Possible fix:
        add (Member (Writer [a1]) '[Writer [Int]]) to the context of
          the type signature
      If you already have the constraint you want, instead
        add a type application to specify
          '[a1]' directly, or activate polysemy-plugin which
            can usually infer the type correctly.
    • In the expression: censor init
      In a stmt of a 'do' block:
        censor init $ absorbWriter $ replicateTell 2 5
      In the second argument of ‘($)’, namely
        ‘do tell [1]
            absorbWriter $ replicateTell 2 5
            censor init $ absorbWriter $ replicateTell 2 5’
   |
76 |           censor init $ absorbWriter $ replicateTell 2 5
   |           ^^^^^^^^^^^

I was able to reproduce this locally like so:

stack unpack polysemy-zoo-0.1.2.0 && cd polysemy-zoo-0.1.2.0
echo 'resolver: nightly-2019-06-08' > stack.yaml
stack build --test --bench --no-run-benchmarks --fast
isovector commented 5 years ago

I have a fix, just need to wait for the stackage mirror to update. https://github.com/isovector/polysemy-zoo/pull/22