diff options
Diffstat (limited to 'ghc')
-rw-r--r-- | ghc/GHCi/UI.hs | 6 | ||||
-rw-r--r-- | ghc/Main.hs | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 494ab29021..f698b5abed 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -1998,8 +1998,12 @@ addModule files = do checkTargetModule :: GHC.GhcMonad m => ModuleName -> m Bool checkTargetModule m = do hsc_env <- GHC.getSession + let fc = hsc_FC hsc_env + let home_unit = hsc_home_unit hsc_env + let units = hsc_units hsc_env + let dflags = hsc_dflags hsc_env result <- liftIO $ - Finder.findImportedModule hsc_env m (Just (fsLit "this")) + Finder.findImportedModule fc units home_unit dflags m (Just (fsLit "this")) case result of Found _ _ -> return True _ -> (liftIO $ putStrLn $ diff --git a/ghc/Main.hs b/ghc/Main.hs index 1ea72d0b1c..00aeaf5028 100644 --- a/ghc/Main.hs +++ b/ghc/Main.hs @@ -244,7 +244,8 @@ main' postLoadMode dflags0 args flagWarnings = do GHC.printException e liftIO $ exitWith (ExitFailure 1)) $ do case postLoadMode of - ShowInterface f -> liftIO $ showIface (hsc_dflags hsc_env) + ShowInterface f -> liftIO $ showIface (hsc_logger hsc_env) + (hsc_dflags hsc_env) (hsc_units hsc_env) (hsc_NC hsc_env) f @@ -836,13 +837,16 @@ abiHash :: [String] -- ^ List of module names -> Ghc () abiHash strs = do hsc_env <- getSession - let dflags = hsc_dflags hsc_env + let fc = hsc_FC hsc_env + let home_unit = hsc_home_unit hsc_env + let units = hsc_units hsc_env + let dflags = hsc_dflags hsc_env liftIO $ do let find_it str = do let modname = mkModuleName str - r <- findImportedModule hsc_env modname Nothing + r <- findImportedModule fc units home_unit dflags modname Nothing case r of Found _ m -> return m _error -> throwGhcException $ CmdLineError $ showSDoc dflags $ |