[GHC] #15767: "StgCmmEnv: variable not found" with FunctionalDependencies and FlexibleContexts

GHC ghc-devs at haskell.org
Wed Oct 17 23:02:22 UTC 2018


#15767: "StgCmmEnv: variable not found" with FunctionalDependencies and
FlexibleContexts
-------------------------------------+-------------------------------------
           Reporter:  roland         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.1
           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:
-------------------------------------+-------------------------------------
 {{{
 {-# LANGUAGE FunctionalDependencies, FlexibleContexts #-}

 module Bug where

 class C a b | b -> a where f :: a -> b

 y = x where
   x :: (C () b, C Bool b) => b
   x  = f ()
 }}}



 {{{
 $ ghc -c Bug.hs
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.6.1 for x86_64-unknown-openbsd):
         StgCmmEnv: variable not found
   $dC_a1lC
   local binds for:
   f
   $tc'C:C
   $tcC
   $trModule
   $tc'C:C1_r1mz
   $tc'C:C2_r1n0
   $krep_r1n1
   $krep1_r1n2
   $krep2_r1n3
   $krep3_r1n4
   $krep4_r1n5
   $tcC1_r1n6
   $tcC2_r1n7
   $krep5_r1n8
   $krep6_r1n9
   $krep7_r1na
   $trModule1_r1nb
   $trModule2_r1nc
   $trModule3_r1nd
   $trModule4_r1ne
   $krep8_r1nf
   $krep9_r1ng
   Call stack:
       CallStack (from HasCallStack):
         callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in
 ghc:Outputable
         pprPanic, called at compiler/codeGen/StgCmmEnv.hs:149:9 in
 ghc:StgCmmEnv

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

 }}}

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


More information about the ghc-tickets mailing list