summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2019-10-23 18:05:13 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-29 03:47:44 -0400
commit593f6543d2c9888375d684d46a3d94c63a633c8d (patch)
tree2bf8faf059deb6406eaaf22439dbfe7f259de431
parentdcd40c714172c976b9cc1ce5e6c1e0b3a55d968b (diff)
downloadhaskell-593f6543d2c9888375d684d46a3d94c63a633c8d.tar.gz
MkIface: Remove redundant parameter and outdated comments from addFingerprints
-rw-r--r--compiler/iface/MkIface.hs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/iface/MkIface.hs b/compiler/iface/MkIface.hs
index 313fdc0eaa..cb9e183c1a 100644
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -164,7 +164,7 @@ mkFullIface :: HscEnv -> PartialModIface -> IO ModIface
mkFullIface hsc_env partial_iface = do
full_iface <-
{-# SCC "addFingerprints" #-}
- addFingerprints hsc_env partial_iface (mi_decls partial_iface)
+ addFingerprints hsc_env partial_iface
-- Debug printing
dumpIfSet_dyn (hsc_dflags hsc_env) Opt_D_dump_hi "FINAL INTERFACE" (pprModIface full_iface)
@@ -409,13 +409,13 @@ thing that we are currently fingerprinting.
-- See Note [Fingerprinting IfaceDecls]
addFingerprints
:: HscEnv
- -> PartialModIface -- The new interface (lacking decls)
- -> [IfaceDecl] -- The new decls
- -> IO ModIface -- Updated interface
-addFingerprints hsc_env iface0 new_decls
+ -> PartialModIface
+ -> IO ModIface
+addFingerprints hsc_env iface0
= do
eps <- hscEPS hsc_env
let
+ decls = mi_decls iface0
warn_fn = mkIfaceWarnCache (mi_warns iface0)
fix_fn = mkIfaceFixCache (mi_fixities iface0)
@@ -433,7 +433,7 @@ addFingerprints hsc_env iface0 new_decls
-- from its OccName. See Note [default method Name]
top_lvl_name_env =
mkOccEnv [ (nameOccName nm, nm)
- | IfaceId { ifName = nm } <- new_decls ]
+ | IfaceId { ifName = nm } <- decls ]
-- Dependency edges between declarations in the current module.
-- This is computed by finding the free external names of each
@@ -441,7 +441,7 @@ addFingerprints hsc_env iface0 new_decls
-- declaration implicitly depends on).
edges :: [ Node Unique IfaceDeclABI ]
edges = [ DigraphNode abi (getUnique (getOccName decl)) out
- | decl <- new_decls
+ | decl <- decls
, let abi = declABI decl
, let out = localOccs $ freeNamesDeclABI abi
]
@@ -466,7 +466,7 @@ addFingerprints hsc_env iface0 new_decls
-- e.g. a reference to a constructor must be turned into a reference
-- to the TyCon for the purposes of calculating dependencies.
parent_map :: OccEnv OccName
- parent_map = foldl' extend emptyOccEnv new_decls
+ parent_map = foldl' extend emptyOccEnv decls
where extend env d =
extendOccEnvList env [ (b,n) | b <- ifaceDeclImplicitBndrs d ]
where n = getOccName d