panic compiling file with unboxed tuples, ghc 8.2-8.4
Summary
ghc panic compiling file with unboxed tuples
Steps to reproduce
With ghc 8.2.1, 8.2.2, 8.4.3, or 8.4.4 run:
$ ghc -O1 MyModule.hs
This is minimal as I'm able to get it -- sorry I don't know how to simplify it further. It's a minimal-ized version of code from unordered-containers
version 0.2.10.0 and hashable
version 1.3.0.0 (the most recent version of each). I ran into the problem while trying to compile mono-traversable
version 1.0.15.1.
No panic occurs with optimization flag -O0
, but it does for -O2
.
Expected behavior
Compile, and not panic.
Actual behaviour: I get the following output
[1 of 1] Compiling MyModule ( MyModule.hs, MyModule.o )
ghc: panic! (the 'impossible' happened)
(GHC version 8.4.4 for x86_64-unknown-linux):
isUnliftedType
r_s44t :: TYPE rep_s44s
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:1939:10 in ghc:Type
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Environment
- GHC version used: 8.4.4
Optional:
- Operating System: Ubuntu 16.04
- System Architecture: x86_64