tcLookupLocatedGlobalId, tcLookupLocatedTyCon,
tcLookupLocatedClass, tcLookupLocatedDataCon,
- getInGlobalScope,
-
-- Local environment
tcExtendKindEnv,
tcExtendTyVarEnv, tcExtendTyVarEnv2,
= 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,hpt) <- getEpsAndHpt
- ; 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