Skip to content

ghc panic in cabal repl

Summary

I can compile the project with cabal build but when I try to load the module in the repl it fails with a ghc painc.

Steps to reproduce

cd /tmp
git clone https://github.com/BebeSparkelSparkel/mtl.git
cd mtl
git checkout 570366d6e80095552a22c310e4f745e93cf631b5
cabal exec ghci
:l Control/Monad/Writer/Class.hs

The load should fail with

[1 of 1] Compiling Control.Monad.Writer.Class ( Control/Monad/Writer/Class.hs, interpreted )

Control/Monad/Writer/Class.hs:241:161: error:ghc: panic! (the 'impossible' happened)
  (GHC version 9.2.7:
        No skolem info:
  [k_a1my]
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Panic.hs:181:37 in ghc:GHC.Utils.Panic
        pprPanic, called at compiler/GHC/Tc/Errors.hs:2948:17 in ghc:GHC.Tc.Errors

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

Expected behavior

Compilation succeeds (no panics, and no errors either).

Environment

  • GHC version used: 9.2.7

Optional:

  • Operating System: OpenBSD 7.4
  • System Architecture: x86_64
Edited by sheaf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information