[GHC] #10438: GHC 7.10.1 panic due to PartialTypeSignatures, TypeFamilies, and local bindings

GHC ghc-devs at haskell.org
Fri May 22 00:52:41 UTC 2015


#10438: GHC 7.10.1 panic due to PartialTypeSignatures, TypeFamilies, and local
bindings
-------------------------------------+-------------------------------------
              Reporter:  rpglover64  |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  high        |         Milestone:
             Component:  Compiler    |           Version:  7.10.1
              Keywords:              |  Operating System:  Linux
          Architecture:  x86_64      |   Type of failure:  Compile-time
  (amd64)                            |  crash
             Test Case:              |        Blocked By:
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 {{{#!hs
 {-# LANGUAGE PartialTypeSignatures #-}
 {-# LANGUAGE TypeFamilies #-}
 module Bad
 where

 foo f = g
   where g r = x
           where x :: _
                 x = r
 }}}

 When compiled, it produces the following output:

 {{{
 [1 of 1] Compiling Bad              ( src/Bad.hs, src/Bad.o )

 src/Bad.hs:8:22: Warning:
     Found hole ‘_’ with type: w_1
     Where: ‘w_1’ is a rigid type variable bound by
                  the inferred type of g :: w_1 -> w_1 at src/Bad.hs:7:9
     Relevant bindings include
       r :: w_1 (bound at src/Bad.hs:7:11)
       g :: w_1 -> w_1 (bound at src/Bad.hs:7:9)
       f :: t (bound at src/Bad.hs:6:5)
       foo :: t -> w_ -> w_ (bound at src/Bad.hs:6:1)
     In the type signature for ‘x’: _
     In an equation for ‘g’:
         g r
           = x
           where
               x :: _
               x = r
     In an equation for ‘foo’:
         foo f
           = g
           where
               g r
                 = x
                 where
                     x :: _
                     x = r
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.10.1 for x86_64-unknown-linux):
         StgCmmEnv: variable not found
   x_alC
   local binds for:
   f_sv5
   r_sv6

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

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


More information about the ghc-tickets mailing list