From: Manuel M T Chakravarty Date: Wed, 20 Sep 2006 18:49:34 +0000 (+0000) Subject: Use smart lookup for tycons X-Git-Tag: After_FC_branch_merge~10 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=24bb49b71bce13faa263386e68d49fc0b05557b7 Use smart lookup for tycons Mon Sep 18 19:49:35 EDT 2006 Manuel M T Chakravarty * Use smart lookup for tycons Tue Sep 12 12:55:10 EDT 2006 Manuel M T Chakravarty * Use smart lookup for tycons --- diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs index 737cd63..0c0c93a 100644 --- a/compiler/typecheck/TcTyClsDecls.lhs +++ b/compiler/typecheck/TcTyClsDecls.lhs @@ -27,7 +27,8 @@ import TcEnv ( TyThing(..), tcLookupLocated, tcLookupLocatedGlobal, tcExtendGlobalEnv, tcExtendKindEnv, tcExtendKindEnvTvs, newFamInstTyConName, - tcExtendRecEnv, tcLookupTyVar, InstInfo ) + tcExtendRecEnv, tcLookupTyVar, InstInfo, + tcLookupLocatedTyCon ) import TcTyDecls ( calcRecFlags, calcClassCycles, calcSynCycles ) import TcClassDcl ( tcClassSigs, tcAddDeclCtxt ) import TcHsType ( kcHsTyVars, kcHsLiftedSigType, kcHsType, @@ -371,10 +372,8 @@ kcIdxTyPats :: TyClDecl Name -> TcM a kcIdxTyPats decl thing_inside = kcHsTyVars (tcdTyVars decl) $ \tvs -> - do { tc_ty_thing <- tcLookupLocated (tcdLName decl) - ; let { family = case tc_ty_thing of - AGlobal (ATyCon family) -> family - ; (kinds, resKind) = splitKindFunTys (tyConKind family) + do { family <- tcLookupLocatedTyCon (tcdLName decl) + ; let { (kinds, resKind) = splitKindFunTys (tyConKind family) ; hs_typats = fromJust $ tcdTyPats decl } -- we may not have more parameters than the kind indicates