[GHC] #12512: UnboxedTupleRep-related panic involving typeclasses

GHC ghc-devs at haskell.org
Sun Aug 21 23:07:47 UTC 2016


#12512: UnboxedTupleRep-related panic involving typeclasses
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  crash
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:  #11723
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 You can trigger a GHC panic by abusing `UnboxedTupleRep` in just the right
 way:

 {{{#!hs
 {-# LANGUAGE DataKinds #-}
 {-# LANGUAGE KindSignatures #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE UnboxedTuples #-}

 import GHC.Exts

 class Wat (a :: TYPE 'UnboxedTupleRep)
 deriving instance Wat (# a, b #)
 }}}

 {{{
 $ /opt/ghc/8.0.1/bin/ghc Bug.hs
 [1 of 1] Compiling Bug              ( Bug.hs, Bug.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.1 for x86_64-unknown-linux):
         newTyConEtadArity (#,#)

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 This is probably a leak that #11723 didn't plug, as it only considered
 datatypes, not typeclasses.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12512>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list