panic on negative literal in case on Word
module Case where
f :: Word -> Word
f n = case n of
-1 -> 2
_ -> 3
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 8.1.20170119 for x86_64-unknown-linux):
ASSERT failed!
-1
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1182:22 in ghc:Outputable
assertPprPanic, called at compiler/basicTypes/Literal.hs:223:75 in ghc:Literal
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/utils/Outputable.hs:1180:5 in ghc:Outputable
assertPprPanic, called at compiler/basicTypes/Literal.hs:223:75 in ghc:Literal
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Doesn't happen in 8.0.1.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |