X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcExpr.lhs;h=89b7d9baa1041f563470ce0f356ee5a03151ec61;hb=e77403886f512c90120fd2f82dcd3e2b0a1d0b04;hp=bd31533dffd90db5295b6378f8d3e76fc3770f88;hpb=37f7228038a8228e1c33c4eaa3c19cab840ad051;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcExpr.lhs b/ghc/compiler/typecheck/TcExpr.lhs index bd31533..89b7d9b 100644 --- a/ghc/compiler/typecheck/TcExpr.lhs +++ b/ghc/compiler/typecheck/TcExpr.lhs @@ -11,8 +11,10 @@ module TcExpr ( tcExpr, tcExpr_id, tcMonoExpr ) where #ifdef GHCI /* Only if bootstrapped */ import {-# SOURCE #-} TcSplice( tcSpliceExpr, tcBracket ) import HsSyn ( HsReify(..), ReifyFlavour(..) ) -import TcEnv ( bracketOK, tcMetaTy ) +import TcEnv ( bracketOK, tcMetaTy, tcLookupGlobal, + wellStaged, metaLevel ) import TcSimplify ( tcSimplifyBracket ) +import Name ( isExternalName ) import qualified DsMeta #endif @@ -33,8 +35,7 @@ import Inst ( InstOrigin(..), ) import TcBinds ( tcBindsAndThen ) import TcEnv ( tcLookupClass, tcLookupGlobal_maybe, tcLookupIdLvl, - tcLookupTyCon, tcLookupDataCon, tcLookupId, tcLookupGlobal, - wellStaged, metaLevel + tcLookupTyCon, tcLookupDataCon, tcLookupId ) import TcMatches ( tcMatchesCase, tcMatchLambda, tcDoStmts ) import TcMonoType ( tcHsSigType, UserTypeCtxt(..) ) @@ -44,7 +45,7 @@ import TcMType ( tcInstTyVars, tcInstType, newHoleTyVarTy, zapToType, newTyVarTy, newTyVarTys, zonkTcType, readHoleResult ) import TcType ( TcType, TcSigmaType, TcRhoType, TyVarDetails(VanillaTv), tcSplitFunTys, tcSplitTyConApp, mkTyVarTys, - isSigmaTy, isTauTy, mkFunTy, mkFunTys, + isSigmaTy, mkFunTy, mkFunTys, mkTyConApp, mkClassPred, tcFunArgTy, tyVarsOfTypes, isLinearPred, liftedTypeKind, openTypeKind, @@ -54,7 +55,7 @@ import TcType ( TcType, TcSigmaType, TcRhoType, TyVarDetails(VanillaTv), import FieldLabel ( FieldLabel, fieldLabelName, fieldLabelType, fieldLabelTyCon ) import Id ( Id, idType, recordSelectorFieldLabel, isRecordSelector, isDataConWrapId_maybe ) import DataCon ( DataCon, dataConFieldLabels, dataConSig, dataConStrictMarks ) -import Name ( Name, isExternalName ) +import Name ( Name ) import TyCon ( TyCon, tyConTyVars, tyConTheta, isAlgTyCon, tyConDataCons ) import Subst ( mkTopTyVarSubst, substTheta, substTy ) import VarSet ( emptyVarSet, elemVarSet ) @@ -874,8 +875,8 @@ tcId name -- Look up the Id and instantiate its type | want_method_inst fun_ty = tcInstType VanillaTv fun_ty `thenM` \ (tyvars, theta, tau) -> newMethodWithGivenTy orig fun_id - (mkTyVarTys tyvars) theta tau `thenM` \ meth -> - loop (HsVar (instToId meth)) tau + (mkTyVarTys tyvars) theta tau `thenM` \ meth_id -> + loop (HsVar meth_id) tau loop fun fun_ty | isSigmaTy fun_ty