[GHC] #12732: GHC bug

GHC ghc-devs at haskell.org
Tue Oct 18 05:47:42 UTC 2016


#12732: GHC bug
-------------------------------------+-------------------------------------
           Reporter:  Iceland_jack   |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.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:
-------------------------------------+-------------------------------------
 A frog told me about this

 {{{#!hs
 (a ... b) xs
   | a == x
   , (l, _:r) <- break (== x) xs
   = l ++ [x]
 }}}

 {{{
 baldur at Loki:~$ ghci -fobject-code -fdefer-typed-holes -ignore-dot-ghci
 /tmp/tnVL.hs
 GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
 [1 of 1] Compiling Main             ( /tmp/tnVL.hs, /tmp/tnVL.o )

 /tmp/tnVL.hs:2:10: warning: [-Wtyped-holes]
     Variable not in scope: x

 /tmp/tnVL.hs:3:27: warning: [-Wtyped-holes]
     Variable not in scope: x

 /tmp/tnVL.hs:4:11: warning: [-Wtyped-holes]
     Variable not in scope: x
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.1 for x86_64-unknown-linux):
         StgCmmEnv: variable not found
   $dEq_a26w
   local binds for:
   $trModule
   $trModule1_r29y
   $trModule2_r2a9
   x_r2aa
   x1_r2ab
   x2_r2ac
   a2_s2ah
   b_s2ai
   xs_s2aj
   fail_s2ak

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

 >
 }}}

 I managed to find a more minimal example

 {{{#!hs
 u a | a == x = undefined
 }}}

 doesn't trigger error in GHCi.

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


More information about the ghc-tickets mailing list