Panic involving unboxed tuples and phantom types
I ran into a bug involving unboxed tuples and the following piece of code is an attempt at isolating the problem:
{-# LANGUAGE UnboxedTuples #-}
module Main where
type Ty a = Int
bug :: Ty a -> (# Ty a, () #)
bug ty = (# ty, () #)
main = do
let (# a, b #) = bug undefined
return ()
It seems that the phantom type is necessary to trigger the bug.
The bug is still present in 7.8rc1.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |