[GHC] #16127: Panic: piResultTys1 in compiler/types/Type.hs:1022:5

GHC ghc-devs at haskell.org
Sat Jan 5 15:20:19 UTC 2019


#16127: Panic: piResultTys1 in compiler/types/Type.hs:1022:5
-------------------------------------+-------------------------------------
        Reporter:  _deepfire         |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.6.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 This can be minimized down to the following four modules:

 {{{#!hs
 -- A.hs
 module A (Vocab(..)) where

 import Data.Kind
 import {-# SOURCE #-} B

 data T i = MkT i

 thisPanics :: x
 thisPanics = method (MkT 'a')
 }}}
 {{{#!hs
 -- A.hs-boot
 {-# LANGUAGE PolyKinds #-}
 module A where

 data T i
 }}}
 {{{#!hs
 -- B.hs
 module B where

 import A

 class C i where
   method :: T i -> x
 }}}
 {{{#!hs
 -- B.hs-boot
 module B where

 import {-# SOURCE #-} A

 class C i where
   method :: T i -> x
 }}}
 -----
 {{{
 $ /opt/ghc/8.6.3/bin/ghc A.hs
 [1 of 4] Compiling A[boot]          ( A.hs-boot, A.o-boot )
 [2 of 4] Compiling B[boot]          ( B.hs-boot, B.o-boot )
 [3 of 4] Compiling A                ( A.hs, A.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.6.3 for x86_64-unknown-linux):
         piResultTys1
   *
   [i_aYf[tau:1]]
   Call stack:
       CallStack (from HasCallStack):
         callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in
 ghc:Outputable
         pprPanic, called at compiler/types/Type.hs:1022:5 in ghc:Type
 }}}

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


More information about the ghc-tickets mailing list