"panic! (the 'impossible' happened)" attempting to print the contents of a mutable vector in GHCi
Summary
I got an panic when trying to print the contents of a mutable vector while debugging using "toList $ freeze t" in GHCi (t is my vector).
The full message is:
[/home/anthony/haskell/SubStringSearching/app/Main.hs:32:7-17] >toList $ freeze t
<interactive>:39:17: error:<interactive>: panic! (the 'impossible' happened)
(GHC version 8.6.5 for x86_64-unknown-linux):
No skolem info:
[s_I8aZ[rt]]
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable
pprPanic, called at compiler/typecheck/TcErrors.hs:2891:5 in ghc:TcErrors
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
[/home/anthony/haskell/SubStringSearching/app/Main.hs:32:7-17] >
Steps to reproduce
- In GHCi set a breakpoint on line 37 of the attached source code Main.hs
- Step through the code until it reaches Main.hs:32:7-17
- Run the command: toList $ freeze t
Expected behavior
Not a panic, probably print the contents of t.
Environment
- GHC version used: 8.6.5 for x86_64-unknown-linux
Optional:
- Operating System: Ubuntu 19.04
- System Architecture: