X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnMonad.lhs;h=6a7f4fb3d5cfc93af91cbfe873c728c03d95ae14;hb=84923cc7de2a93c22a2f72daf9ac863959efae13;hp=e6d75e3a6509740f84e327d0e4926cbaac9a4818;hpb=49c98d143c382a1341e1046f5ca00819a25691ba;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs index e6d75e3..6a7f4fb 100644 --- a/compiler/typecheck/TcRnMonad.lhs +++ b/compiler/typecheck/TcRnMonad.lhs @@ -14,16 +14,12 @@ module TcRnMonad( import TcRnTypes -- Re-export all import IOEnv -- Re-export all -#if defined(GHCI) && defined(BREAKPOINT) +#if defined(GHCI) import TypeRep -import Var import IdInfo -import OccName -import SrcLoc import TysWiredIn import PrelNames -import NameEnv -import TcEnv +import {-#SOURCE#-} TcEnv #endif import HsSyn hiding (LIE) @@ -47,7 +43,6 @@ import OccName import Bag import Outputable import UniqSupply -import UniqFM import Unique import DynFlags import StaticFlags @@ -73,6 +68,7 @@ ioToTcRn = ioToIOEnv \end{code} \begin{code} + initTc :: HscEnv -> HscSource -> Module @@ -103,7 +99,7 @@ initTc hsc_env hsc_src mod do_this tcg_inst_uses = dfuns_var, tcg_th_used = th_var, tcg_exports = [], - tcg_imports = init_imports, + tcg_imports = emptyImportAvails, tcg_dus = emptyDUs, tcg_rn_imports = Nothing, tcg_rn_exports = Nothing, @@ -149,12 +145,6 @@ initTc hsc_env hsc_src mod do_this return (msgs, final_res) } - where - init_imports = emptyImportAvails {imp_env = unitUFM (moduleName mod) []} - -- Initialise tcg_imports with an empty set of bindings for - -- this module, so that if we see 'module M' in the export - -- list, and there are no bindings in M, we don't bleat - -- "unknown module M". initTcPrintErrors -- Used from the interactive loop only :: HscEnv @@ -170,7 +160,7 @@ initTcPrintErrors env mod todo = do \begin{code} addBreakpointBindings :: TcM a -> TcM a addBreakpointBindings thing_inside -#if defined(GHCI) && defined(BREAKPOINT) +#if defined(GHCI) = do { unique <- newUnique ; let { var = mkInternalName unique (mkOccName tvName "a") noSrcLoc; tyvar = mkTyVar var liftedTypeKind; @@ -182,10 +172,10 @@ addBreakpointBindings thing_inside (FunTy (TyVarTy tyvar) (TyVarTy tyvar))))))); breakpointJumpId - = mkGlobalId VanillaGlobal breakpointJumpName + = Id.mkGlobalId VanillaGlobal breakpointJumpName (basicType id) vanillaIdInfo; breakpointCondJumpId - = mkGlobalId VanillaGlobal breakpointCondJumpName + = Id.mkGlobalId VanillaGlobal breakpointCondJumpName (basicType (FunTy boolTy)) vanillaIdInfo } ; tcExtendIdEnv [breakpointJumpId, breakpointCondJumpId] thing_inside}