polysemy-research / polysemy-zoo

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

IdempotentLowering and ghc 9.2 #74

Closed adamConnerSax closed 1 year ago

adamConnerSax commented 2 years ago

polysemy-zoo (hackage latest and d1564f04a2089472a22104f9ecce94674a56ef77) fails to compile on ghc9.2.2 because of errors in IdempotentLowering.hs. The first:

src/Polysemy/IdempotentLowering.hs:26:16: error:
    • Couldn't match representation of type: forall x1. m1 x1 -> n1 x1
                               with that of: m x -> n x
        arising from a use of ‘coerce’
    • In the first argument of ‘($)’, namely ‘coerce’
      In the second argument of ‘($)’, namely ‘coerce $ Nat f’
      In the expression: pure $ coerce $ Nat f
    • Relevant bindings include
        f :: forall (x :: k). m x -> n x
          (bound at src/Polysemy/IdempotentLowering.hs:26:5)
        nat :: (forall (x :: k). m x -> n x)
               -> base (forall (x :: k). m x -> n x)
          (bound at src/Polysemy/IdempotentLowering.hs:26:1)
   |
26 | nat f = pure $ coerce $ Nat f
   |                ^^^^^^

I took a shot at figuring this out, googled a bit. etc. but I got nowhere.

KingoftheHomeless commented 2 years ago

IdempotentLowering is old, unreliable, outclassed by Final, and deprecated. I suggest removing the module altogether. This makes for a good first issue!

ShapeOfMatter commented 1 year ago

To clarify; this issue is resolved, yes?

KingoftheHomeless commented 1 year ago

Yup; merged and released.