Unboxed sums-related panic: getUnboxedSumName 513
Originally reported here. You'll need these two files:
-- Testing.hs
{-# LANGUAGE UnboxedSums #-}
module Testing where
func :: s -> (# Bool | Bool #)
func _ = (# True | #)
-- Bug.hs
{-# LANGUAGE UnboxedSums #-}
module Main where
import Testing
main :: IO ()
main = print $ func 1
And you must compile them like so (the -c and -O2 flags are important):
$ ghc -O2 -c Testing.hs
$ ghc -O2 -c Bug.hs
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.1 for x86_64-unknown-linux):
getUnboxedSumName
513
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/prelude/KnownUniques.hs:104:5 in ghc:KnownUniques
Reproducible with GHC 8.2.1 and HEAD.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.2.1-rc2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |