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

ghc 8.10 and ghc-prim bound #65

Open adamConnerSax opened 4 years ago

adamConnerSax commented 4 years ago

Currently, the zoo won't compile with ghc 8.10.1 because of an upper bound on ghc-prim. It might be as simple as raising the bound. However, when I tried to check via an "allow-newer" in cabal.project, the compiler crashed with a ghc-panic while compiling Polysemy.RevState

<no location info>: error:
    ghc: panic! (the 'impossible' happened)
  (GHC version 8.10.1:
    mergeSATInfo
  Left:STSTSTSVSVSV, Right:STSTSTSVSCNSNS
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1179:37 in ghc:Outputable
        pprPanic, called at compiler/simplCore/SAT.hs:152:20 in ghc:SAT

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug
isovector commented 4 years ago

:scream:

adamConnerSax commented 4 years ago

I know this is being tracked via https://github.com/polysemy-research/polysemy/issues/356 but this "solution" is specific to the issue with RevState in the zoo. I've got a branch that compiles with ghc-8.10.2, but only because I used CPP to remove the runXXX function in RevState. If it's any help debugging, the bug only triggers if the functions are exported. They compile fine. But if either run function is on the export list, we get the GHC panic.

For now it suits my purposes, since I can use that and start working with 8.10. Should I make a PR? It's hardly a real fix, and it's obviously breaking, but it's also better in some ways than not being able to use the lib at all with ghc-8.10. The PR also bumps the upper bound on ghc-prim, otherwise polysemy-zoo won't compile with ghc-8.10.x, and the upper bound on random since that was an important upgrade in random.

KingoftheHomeless commented 4 years ago

If it's plugin-specific, it's better to rewrite polysemy-zoo to not make use of it. That's a horrible amount of work, however. I'll get to it.

adamConnerSax commented 4 years ago

Okay! I'l just use my fork for now, then. Thanks!

KingoftheHomeless commented 4 years ago

Stop-gap for this has been implemented through #66. Not closing this since the underlying bug hasn't been fixed.

spacekitteh commented 3 years ago

Could a 0.7.0.1 release be pushed in the meantime?

KingoftheHomeless commented 3 years ago

Done.

spacekitteh commented 3 years ago

This needs to occur again for 9.0