From 24bb49b71bce13faa263386e68d49fc0b05557b7 Mon Sep 17 00:00:00 2001 From: Manuel M T Chakravarty Date: Wed, 20 Sep 2006 18:49:34 +0000 Subject: [PATCH] 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 --- compiler/typecheck/TcTyClsDecls.lhs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 -- 1.7.10.4