#5768: GHC Panic compiling type family with -XPolyKinds
--------------------------------+-------------------------------------------
 Reporter:  goldfire            |          Owner:                  
     Type:  bug                 |         Status:  new             
 Priority:  normal              |      Component:  Compiler        
  Version:  7.4.1-rc1           |       Keywords:  PolyKinds       
       Os:  Unknown/Multiple    |   Architecture:  Unknown/Multiple
  Failure:  Compile-time crash  |       Testcase:                  
Blockedby:                      |       Blocking:                  
  Related:                      |  
--------------------------------+-------------------------------------------
 I received the following error message:


 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.4.0.20111219 for x86_64-unknown-linux):
         tyConKind ghc-prim:GHC.Prim.BOX{(w) tc 347}
 }}}


 I was compiling the following code:

 {{{
 {-# LANGUAGE TypeFamilies,
              PolyKinds,
              ScopedTypeVariables
  #-}

 convert :: a -> b
 convert = undefined

 type family Foo a

 bar :: forall a b. b -> (Foo a)
 bar f = (convert f :: (Foo a))
 }}}


 Interestingly, the output is different when changing the order in the
 forall (forall b a produces a different error). The same result happened
 on Linux/x86_64 and MacOS 10.7.2/x86_64-apple-darwin,

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to