From 5a1ac8dcffd7477aa448f2f8e1552df8c91381ad Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 26 Nov 2001 10:33:40 +0000 Subject: [PATCH] [project @ 2001-11-26 10:33:40 by simonpj] Complete previous tcAddImportedIdInfo commit --- ghc/compiler/typecheck/TcEnv.lhs | 12 +----------- ghc/compiler/typecheck/TcInstDcls.lhs | 6 ++---- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/ghc/compiler/typecheck/TcEnv.lhs b/ghc/compiler/typecheck/TcEnv.lhs index f2e0d1d..b2fe7d9 100644 --- a/ghc/compiler/typecheck/TcEnv.lhs +++ b/ghc/compiler/typecheck/TcEnv.lhs @@ -27,7 +27,7 @@ module TcEnv( tcGetGlobalTyVars, tcExtendGlobalTyVars, -- Random useful things - RecTcEnv, tcAddImportedIdInfo, tcLookupRecId, tcLookupRecId_maybe, + RecTcEnv, tcLookupRecId, tcLookupRecId_maybe, -- New Ids newLocalName, newDFunName, @@ -208,16 +208,6 @@ type RecTcEnv = TcEnv -- on imported things and for looking up Ids in unfoldings -- The environment doesn't have any local Ids in it -tcAddImportedIdInfo :: RecTcEnv -> Id -> Id -tcAddImportedIdInfo env id - = id `lazySetIdInfo` new_info - -- The Id must be returned without a data dependency on maybe_id - where - new_info = case tcLookupRecId_maybe env (idName id) of - Nothing -> pprTrace "tcAddIdInfo" (ppr id) vanillaIdInfo - Just imported_id -> idInfo imported_id - -- ToDo: could check that types are the same - tcLookupRecId_maybe :: RecTcEnv -> Name -> Maybe Id tcLookupRecId_maybe env name = case lookup_global env name of Just (AnId id) -> Just id diff --git a/ghc/compiler/typecheck/TcInstDcls.lhs b/ghc/compiler/typecheck/TcInstDcls.lhs index 49229c1..77d6591 100644 --- a/ghc/compiler/typecheck/TcInstDcls.lhs +++ b/ghc/compiler/typecheck/TcInstDcls.lhs @@ -35,11 +35,9 @@ import Inst ( InstOrigin(..), LIE, mkLIE, emptyLIE, plusLIE, plusLIEs ) import TcDeriv ( tcDeriving ) import TcEnv ( TcEnv, tcExtendGlobalValEnv, - tcExtendTyVarEnvForMeths, tcLookupId, - tcAddImportedIdInfo, tcLookupClass, + tcExtendTyVarEnvForMeths, tcLookupId, tcLookupClass, InstInfo(..), pprInstInfo, simpleInstInfoTyCon, - simpleInstInfoTy, newDFunName, - isLocalThing, + simpleInstInfoTy, newDFunName ) import InstEnv ( InstEnv, extendInstEnv ) import PprType ( pprClassPred ) -- 1.7.10.4