X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcEnv.lhs;h=1c77e4d12903d84dd05dd2e2255cef888f15e548;hb=4e3255388e8b99ccdae290bfcb6cd666b8c93d4a;hp=cb2eb28004c8da210c86f8ef180baa4685a92a88;hpb=9ec3012e2fd5b998e32897c03551574038fd59a8;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcEnv.lhs b/ghc/compiler/typecheck/TcEnv.lhs index cb2eb28..1c77e4d 100644 --- a/ghc/compiler/typecheck/TcEnv.lhs +++ b/ghc/compiler/typecheck/TcEnv.lhs @@ -15,8 +15,6 @@ module TcEnv( tcLookupLocatedGlobalId, tcLookupLocatedTyCon, tcLookupLocatedClass, tcLookupLocatedDataCon, - getInGlobalScope, - -- Local environment tcExtendKindEnv, tcExtendTyVarEnv, tcExtendTyVarEnv2, @@ -105,8 +103,7 @@ tcLookupGlobal name Nothing -> notFound "tcLookupGlobal" name else do -- It's imported - { eps <- getEps - ; hpt <- getHpt + { (eps,hpt) <- getEpsAndHpt ; case lookupType hpt (eps_PTE eps) name of Just thing -> return thing Nothing -> do { traceIf (text "tcLookupGlobal" <+> ppr name) @@ -175,22 +172,6 @@ tcExtendGlobalValEnv ids thing_inside = tcExtendGlobalEnv [AnId id | id <- ids] thing_inside \end{code} -A variety of global lookups, when we know what we are looking for. - -\begin{code} -getInGlobalScope :: TcM (Name -> Bool) --- Get all things in the global environment; used for deciding what --- rules to suck in. Anything defined in this module (nameIsLocalOrFrom) --- is certainly in the envt, so we don't bother to look. -getInGlobalScope - = do { mod <- getModule - ; eps <- getEps - ; hpt <- getHpt - ; return (\n -> nameIsLocalOrFrom mod n || - isJust (lookupType hpt (eps_PTE eps) n)) } -\end{code} - - \begin{code} tcExtendRecEnv :: [(Name,TyThing)] -> TcM r -> TcM r -- Extend the global environments for the type/class knot tying game