Opened 20 months ago
Closed 20 months ago
#8762 closed bug (fixed)
Panic involving unboxed tuples and phantom types
Description
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.
Change History (6)
comment:1 Changed 20 months ago by thoughtpolice
- Version changed from 7.6.3 to 7.8.1-rc1
comment:2 Changed 20 months ago by thoughtpolice
- Milestone set to 7.8.1
comment:3 Changed 20 months ago by goldfire
comment:4 Changed 20 months ago by Simon Peyton Jones <simonpj@…>
comment:5 Changed 20 months ago by simonpj
- Status changed from new to merge
- Test Case set to typecheck/should_compile/T8762
Fixed, thank you.
Simon
comment:6 Changed 20 months ago by thoughtpolice
- Resolution set to fixed
- Status changed from merge to closed
Merged.
Note: See TracTickets for help on using tickets.
I just took a look at this and ended up in deeper waters within the type-checker than where I feel comfortable. But I did discover that the bug persists with
Note that there is no undefined, and the previous type synonym Ty has now become a datatype.