id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
7128,"Panic ""lookupVarEnv_NF"" when using a functional dependency with a kind variable",goldfire,,"The following code causes a panic:

{{{
{-# LANGUAGE PolyKinds, DataKinds, MultiParamTypeClasses,
             FunctionalDependencies
 #-}

class Foo a (b :: k) | a -> k
instance Foo Bool False
}}}

The error is 

{{{
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.7.20120807 for x86_64-apple-darwin):
	lookupVarEnv_NF: Nothing
}}}

In previous versions of GHC 7.5.x, a functional dependency of this nature worked just fine and had the expected behavior of fixing the value of {{{k}}} once {{{a}}} was known. It's unclear to me whether this should compile or not, but it shouldn't cause a panic. I believe that my code that used the functional dependency could use {{{a -> b}}} in place of {{{a -> k}}} with no ill effect, so turning this into an error is not a problem.",bug,closed,normal,7.6.1,Compiler,7.5,fixed,PolyKinds FunctionalDependencies,,Unknown/Multiple,Unknown/Multiple,Compile-time crash,Unknown,polykinds/T7128,,,
