irrefutable pattern matching on unboxed tuple causes panic
Compiling the following program with -fglasgow-exts
main = case (# (), () #) of ~(# _, _ #) -> return ()
causes GHC to fail with the message
ghc-6.4.2: panic! (the `impossible' happened, GHC version 6.4.2):
dsLExpr: tuple pattern: return @ () GHC.Base.()
The equivalent (I think) expression
main = let (# _, _ #) = (# (), () #) in return ()
compiles without complaint.
This is GHC version 6.4.2 on i386 Debian with a 2.6.17.6 Linux kernel. I didn't test with any other unboxed types.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.4.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |