diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2021-02-04 23:20:25 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-26 19:00:07 -0400 |
commit | 599efd90d54a01802b1285c0e357738e4d0bdb3a (patch) | |
tree | 2f6468fe8caabebd85d4a84d805bf04f7de1cd77 /ghc/GHCi | |
parent | 872a9444df4d38cd5dc0fbb7a249d89596e73ea2 (diff) | |
download | haskell-599efd90d54a01802b1285c0e357738e4d0bdb3a.tar.gz |
Refactor FinderCache
Diffstat (limited to 'ghc/GHCi')
-rw-r--r-- | ghc/GHCi/UI.hs | 6 |
1 files changed, 5 insertions, 1 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 $ |