[GHC] #8762: Panic involving unboxed tuples and phantom types
GHC
ghc-devs at haskell.org
Sun Feb 9 18:09:59 UTC 2014
#8762: Panic involving unboxed tuples and phantom types
------------------------------------+-------------------------------------
Reporter: josef | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
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.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8762>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list