GHC panic: Bogus proof for stuck type family. (polysemy-plugin)
Summary
Build fails with panic in polysemy-plugin.
Steps to reproduce
In this code:
https://github.com/kephas/xdg-basedir-compliant/tree/polysemy-bug
Running cabal build
triggers this error:
ghc: panic! (the 'impossible' happened)
(GHC version 9.0.2:
Bogus proof for stuck type family.
This means there's a type error in your program, but the fact that
you're seeing this message is a bug in `polysemy-plugin`.
Please file a bug at https://github.com/polysemy-research/polysemy
with a minimal reproduction for how you managed to get this error.
CallStack (from HasCallStack):
error, called at src/Polysemy/Plugin/Fundep.hs:288:9 in polysemy-plugin-0.4.1.1-EpBKoXMm5HlTiTBA0k24:Polysemy.Plugin.Fundep
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
cabal: Failed to build xdg-basedir-compliant-1.0.0 (which is required by
test:xdg-test from xdg-basedir-compliant-1.0.0).
Expected behavior
Build should fail with a type error.
Environment
- GHC version used: 9.0.2 (from nixpkgs)
Optional:
- Operating System: Linux
- System Architecture: amd64