Commit 24bb49b7 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.
Browse files

Use smart lookup for tycons

Mon Sep 18 19:49:35 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
  * Use smart lookup for tycons
  Tue Sep 12 12:55:10 EDT 2006  Manuel M T Chakravarty <chak@cse.unsw.edu.au>
    * Use smart lookup for tycons
parent 6070e794
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment