[GHC] #8479: Generic1 crashes with tyConStupidTheta when using associated type families

GHC ghc-devs at haskell.org
Sat Oct 26 13:28:28 UTC 2013


#8479: Generic1 crashes with tyConStupidTheta when using associated type families
-------------------------------------+-------------------------------------
       Reporter:  ghorn              |             Owner:
           Type:  bug                |            Status:  new
       Priority:  normal             |         Milestone:
      Component:  Compiler           |           Version:  7.6.3
       Keywords:  Generics,          |  Operating System:  Unknown/Multiple
  Generic1                           |   Type of failure:  Compile-time
   Architecture:  Unknown/Multiple   |  crash
     Difficulty:  Unknown            |         Test Case:
     Blocked By:                     |          Blocking:
Related Tickets:                     |
-------------------------------------+-------------------------------------
 {{{
 {-# OPTIONS_GHC -Wall #-}
 {-# Language TypeFamilies #-}
 {-# Language DeriveGeneric #-}

 import GHC.Generics

 class Blah (a :: * -> *) where
   type F a :: * -> *

 data Foo (f :: * -> *) a = MkFoo ((F f) a) deriving Generic1

 --data Foo a = MkFoo ((F f) a) deriving Generic1 -- also crashes
 }}}

 the above code crashes GHC with error:

 {{{
 [1 of 1] Compiling Main             ( GenericBug.hs, GenericBug.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.6.3 for x86_64-unknown-linux):
         tyConStupidTheta main:Main.F{tc ro4}

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

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


More information about the ghc-tickets mailing list