summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Utils/Monad.hs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2022-06-15 21:44:08 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2022-07-27 04:55:12 +0000
commit3767fc823bf2827bab5a972b3d05017bc65e25b3 (patch)
treea6342bbb6982fc0133557bb6c633a4ade2e15e19 /compiler/GHC/Tc/Utils/Monad.hs
parentb154ec781a8f7cf84aa2e415a09e222c60bcd285 (diff)
downloadhaskell-wip/rip-out-interactive-context.tar.gz
WIP: remove `InteractiveContext` from `HscEnv`wip/rip-out-interactive-context
GHC the library typechecks!
Diffstat (limited to 'compiler/GHC/Tc/Utils/Monad.hs')
-rw-r--r--compiler/GHC/Tc/Utils/Monad.hs14
1 files changed, 4 insertions, 10 deletions
diff --git a/compiler/GHC/Tc/Utils/Monad.hs b/compiler/GHC/Tc/Utils/Monad.hs
index 571e02c7cf..cb27824863 100644
--- a/compiler/GHC/Tc/Utils/Monad.hs
+++ b/compiler/GHC/Tc/Utils/Monad.hs
@@ -53,7 +53,7 @@ module GHC.Tc.Utils.Monad(
debugTc,
-- * Typechecker global environment
- getIsGHCi, getGHCiMonad, getInteractivePrintName,
+ getIsGHCi,
tcIsHsBootOrSig, tcIsHsig, tcSelfBootInfo, getGlobalRdrEnv,
getRdrEnvs, getImports,
getFixityEnv, extendFixityEnv, getRecFieldEnv,
@@ -418,11 +418,11 @@ initTcWithGbl hsc_env gbl_env loc do_this
; return (msgs, final_res)
}
-initTcInteractive :: HscEnv -> TcM a -> IO (Messages TcRnMessage, Maybe a)
+initTcInteractive :: HscEnv -> InteractiveContext -> TcM a -> IO (Messages TcRnMessage, Maybe a)
-- Initialise the type checker monad for use in GHCi
-initTcInteractive hsc_env thing_inside
+initTcInteractive hsc_env ic thing_inside
= initTc hsc_env HsSrcFile False
- (icInteractiveModule (hsc_IC hsc_env))
+ (icInteractiveModule ic)
(realSrcLocSpan interactive_src_loc)
thing_inside
where
@@ -910,12 +910,6 @@ getIsGHCi :: TcRn Bool
getIsGHCi = do { mod <- getModule
; return (isInteractiveModule mod) }
-getGHCiMonad :: TcRn Name
-getGHCiMonad = do { hsc <- getTopEnv; return (ic_monad $ hsc_IC hsc) }
-
-getInteractivePrintName :: TcRn Name
-getInteractivePrintName = do { hsc <- getTopEnv; return (ic_int_print $ hsc_IC hsc) }
-
tcIsHsBootOrSig :: TcRn Bool
tcIsHsBootOrSig = do { env <- getGblEnv; return (isHsBootOrSig (tcg_src env)) }