[GHC] #15764: GHC panic from PolyKinds + DataKinds

GHC ghc-devs at haskell.org
Wed Oct 17 16:16:12 UTC 2018


#15764: GHC panic from PolyKinds + DataKinds
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Playing around with GhcKinds/KindInference/Examples gives me a GHC panic

 {{{#!hs
 --
 https://ghc.haskell.org/trac/ghc/wiki/GhcKinds/KindInference/Examples?version=4

 {-# Language PolyKinds #-}
 {-# Language KindSignatures #-}
 {-# Language DataKinds #-}

 import Data.Kind
 import Data.Proxy
 import GHC.TypeLits

 class C6 (k :: Type) (a :: k) (b :: Proxy (a :: k)) where
  type T6 (proxy :: Proxy '(k, b))
 }}}

 on an out of date version of HEAD I get

 {{{
 $ ghci -ignore-dot-ghci 519.hs
 GHCi, version 8.7.20180828: http://www.haskell.org/ghc/  :? for help
 [1 of 1] Compiling Main             ( 519.hs, interpreted )
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 8.7.20180828 for x86_64-unknown-linux):
         ASSERT failed!
   1
   0
   k_a1FD[tau:0]
   Proxy a_a1EN[sk:1]
   Call stack:
       CallStack (from HasCallStack):
         callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in
 ghc:Outputable
         pprPanic, called at compiler/utils/Outputable.hs:1219:5 in
 ghc:Outputable
         assertPprPanic, called at compiler/typecheck/TcMType.hs:768:54 in
 ghc:TcMType

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

 >
 }}}

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


More information about the ghc-tickets mailing list