X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcTyClsDecls.lhs;h=736f619c37b4c1a9c93a56daf678b976e1aea491;hb=2b4d4dcc7f2bb1e90a7c06f111c8460b6348920a;hp=89e6bfe2a60fc68119c91954844e87fb27168482;hpb=1c3601593186639f1086bc402582ff56fd3fe9f8;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcTyClsDecls.lhs b/ghc/compiler/typecheck/TcTyClsDecls.lhs index 89e6bfe..736f619 100644 --- a/ghc/compiler/typecheck/TcTyClsDecls.lhs +++ b/ghc/compiler/typecheck/TcTyClsDecls.lhs @@ -21,7 +21,7 @@ import BasicTypes ( RecFlag(..), NewOrData(..) ) import TcMonad import TcEnv ( ValueEnv, TyThing(..), TyThingDetails(..), tyThingKind, - tcExtendTypeEnv, tcExtendKindEnv, tcLookupTy + tcExtendTypeEnv, tcExtendKindEnv, tcLookupGlobal ) import TcTyDecls ( tcTyDecl1, kcConDetails, mkNewTyConRep ) import TcClassDcl ( tcClassDecl1 ) @@ -249,9 +249,9 @@ kcTyClDeclBody :: Name -> [HsTyVarBndr Name] -- Kind of the tycon/cls and its t -- the kind of the tycon/class. Give it to the thing inside, and -- check the result kind matches kcTyClDeclBody tc_name hs_tyvars thing_inside - = tcLookupTy tc_name `thenNF_Tc` \ tc -> + = tcLookupGlobal tc_name `thenNF_Tc` \ thing -> let - kind = case tc of + kind = case thing of ATyCon tc -> tyConKind tc AClass cl -> tyConKind (classTyCon cl) -- For some odd reason, a class doesn't include its kind