[GHC] #11062: Type families + hs-boot files = panic

GHC ghc-devs at haskell.org
Thu Nov 5 17:00:38 UTC 2015


#11062: Type families + hs-boot files = panic
-------------------------------------+-------------------------------------
           Reporter:  goldfire       |             Owner:
               Type:  bug            |            Status:  new
           Priority:  high           |         Milestone:  8.0.1
          Component:  Compiler       |           Version:  7.11
           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:
-------------------------------------+-------------------------------------
 I have these modules:

 A.hs-boot:
 {{{
 {-# LANGUAGE TypeFamilies #-}
 module A where
 type family F a
 }}}

 B.hs:
 {{{
 {-# LANGUAGE TypeFamilies #-}
 module B where
 import {-# SOURCE #-} A
 type instance F Int = Bool
 }}}

 A.hs:
 {{{
 {-# LANGUAGE TypeFamilies #-}
 module A where
 import B
 type family F a
 }}}

 And now this happens:
 {{{
 rae:11:50:47 ~/temp/bug> ~/Documents/ghc-cur/inplace/bin/ghc-stage2
 --version
 The Glorious Glasgow Haskell Compilation System, version 7.11.20151104
 rae:11:50:50 ~/temp/bug> ~/Documents/ghc-cur/inplace/bin/ghc-stage2 -c A
 .hs-boot
 rae:11:50:52 ~/temp/bug> ~/Documents/ghc-cur/inplace/bin/ghc-stage2 -c
 B.hs
 rae:11:50:54 ~/temp/bug> ~/Documents/ghc-cur/inplace/bin/ghc-stage2 -c
 A.hs
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 7.11.20151104 for x86_64-apple-darwin):
         tcIfaceGlobal (local): not found:
   F
   []

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

 rae:11:50:57 ~/temp/bug>
 }}}

 The problem occurs only in one-shot mode.

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


More information about the ghc-tickets mailing list