"StgCmmEnv: variable not found" with FunctionalDependencies and FlexibleContexts
{-# 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
Trac metadata
Trac field |
Value |
Version |
8.6.1 |
Type |
Bug |
TypeOfFailure |
OtherFailure |
Priority |
normal |
Resolution |
Unresolved |
Component |
Compiler |
Test case |
|
Differential revisions |
|
BlockedBy |
|
Related |
|
Blocking |
|
CC |
|
Operating system |
|
Architecture |
|