Skip to content

panic! (the 'impossible' happened)

I was debugging and tried to print a matrix but got the following error message:

<interactive>:34:21: error:<interactive>: panic! (the 'impossible' happened)

(GHC version 8.0.2 for x86_64-unknown-linux):

No skolem info: a1_IhXR[rt]

UPDATE:

I downloaded ghc 8.2.2, extracted, ran ./config and then make install. Now when I run ghc -v it says

Glasgow Haskell Compiler, Version 8.2.2, stage 2 booted by GHC version 8.0.2

But when I run ghci it says that it is version 8.0.2 and it gives the same 'impossible' error as I did before.

I put the function I was debugging in a small file with the other functions that it depends on (sorry, I accidentally attached the same file twice). It would be very difficult to replicate the test cases I was working with without copying a lot more code. I tried running the function on a simple test case (some 3x4 matrix) and when I tried to print the helper variable desired (mat1) it said that the runtime type of mat1 could not be determined. This was fixed by giving the function calc a type signature. Indeed, when I put this type signature in my actual code, I was able to debug it without a problem.

My biggest concern at this point is how to boot ghci 8.2.2 instead of 8.0.2, and because of this I'm not sure whether or not what I've described here is a problem with 8.2.2 or just 8.0.2.

Edited by Ebanflo
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information