diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2019-10-21 09:15:41 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-29 03:47:44 -0400 |
commit | a56433a912c8d666a113ca56aa5f19dec202cdb6 (patch) | |
tree | 375016af741c78e31acdf18f5043815a0ba85b52 /compiler/iface | |
parent | bbdd54aab2f727bd90efe237eeb72e5e014b0cb2 (diff) | |
download | haskell-a56433a912c8d666a113ca56aa5f19dec202cdb6.tar.gz |
Remove unused DynFlags arg of lookupIfaceByModule
Diffstat (limited to 'compiler/iface')
-rw-r--r-- | compiler/iface/LoadIface.hs | 9 | ||||
-rw-r--r-- | compiler/iface/MkIface.hs | 5 |
2 files changed, 6 insertions, 8 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index 6da6565219..2485f07df2 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -409,7 +409,7 @@ loadInterface doc_str mod from -- Check whether we have the interface already ; dflags <- getDynFlags - ; case lookupIfaceByModule dflags hpt (eps_PIT eps) mod of { + ; case lookupIfaceByModule hpt (eps_PIT eps) mod of { Just iface -> return (Succeeded iface) ; -- Already loaded -- The (src_imp == mi_boot iface) test checks that the already-loaded @@ -675,14 +675,13 @@ moduleFreeHolesPrecise doc_str mod traceIf (text "Considering whether to load" <+> ppr mod <+> text "to compute precise free module holes") (eps, hpt) <- getEpsAndHpt - dflags <- getDynFlags - case tryEpsAndHpt dflags eps hpt `firstJust` tryDepsCache eps imod insts of + case tryEpsAndHpt eps hpt `firstJust` tryDepsCache eps imod insts of Just r -> return (Succeeded r) Nothing -> readAndCache imod insts (_, Nothing) -> return (Succeeded emptyUniqDSet) where - tryEpsAndHpt dflags eps hpt = - fmap mi_free_holes (lookupIfaceByModule dflags hpt (eps_PIT eps) mod) + tryEpsAndHpt eps hpt = + fmap mi_free_holes (lookupIfaceByModule hpt (eps_PIT eps) mod) tryDepsCache eps imod insts = case lookupInstalledModuleEnv (eps_free_holes eps) imod of Just ifhs -> Just (renameFreeHoles ifhs insts) diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs index 296e72a814..313fdc0eaa 100644 --- a/compiler/iface/MkIface.hs +++ b/compiler/iface/MkIface.hs @@ -365,7 +365,7 @@ mkHashFun hsc_env eps name orig_mod = nameModule name lookup mod = do MASSERT2( isExternalName name, ppr name ) - iface <- case lookupIfaceByModule dflags hpt pit mod of + iface <- case lookupIfaceByModule hpt pit mod of Just iface -> return iface Nothing -> do -- This can occur when we're writing out ifaces for @@ -751,9 +751,8 @@ getOrphanHashes hsc_env mods = do let hpt = hsc_HPT hsc_env pit = eps_PIT eps - dflags = hsc_dflags hsc_env get_orph_hash mod = - case lookupIfaceByModule dflags hpt pit mod of + case lookupIfaceByModule hpt pit mod of Just iface -> return (mi_orphan_hash (mi_final_exts iface)) Nothing -> do -- similar to 'mkHashFun' iface <- initIfaceLoad hsc_env . withException |