summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCale Gibbard <cgibbard@gmail.com>2021-02-19 15:35:30 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-08 05:29:18 -0500
commit5dd29aeac4da7b4183bef0737d2f7223ddb9a2a4 (patch)
treee2c3fbe1450de0e1bb5222932e0e476c6977dd3b
parentc3aac0f84d015165884681417905b51ecb7a168b (diff)
downloadhaskell-5dd29aeac4da7b4183bef0737d2f7223ddb9a2a4.tar.gz
`hscSimpleIface` drop fingerprint param and ret
`hscSimpleIface` does not depend on or modify the `Maybe Fingerprint` it is given, only passes it through, so get rid of the extraneous passing. Perhaps the intent was that there would be an iface fingerprint check of some sort? but this was never done. If/when we we want to do that, we can add it back then.
-rw-r--r--compiler/GHC/Driver/Main.hs22
1 files changed, 10 insertions, 12 deletions
diff --git a/compiler/GHC/Driver/Main.hs b/compiler/GHC/Driver/Main.hs
index c3acea5d88..8d8e13fba6 100644
--- a/compiler/GHC/Driver/Main.hs
+++ b/compiler/GHC/Driver/Main.hs
@@ -602,7 +602,7 @@ hsc_typecheck keep_rn mod_summary mb_rdr_module = do
Nothing -> hscParse' mod_summary
tc_result0 <- tcRnModule' mod_summary keep_rn' hpm
if hsc_src == HsigFile
- then do (iface, _, _) <- liftIO $ hscSimpleIface hsc_env tc_result0 mod_summary Nothing
+ then do (iface, _) <- liftIO $ hscSimpleIface hsc_env tc_result0 mod_summary
ioMsgMaybe $ hoistTcRnMessage $
tcRnMergeSignatures hsc_env hpm tc_result0 iface
else return tc_result0
@@ -948,10 +948,10 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h
-- We are not generating code, so we can skip simplification
-- and generate a simple interface.
_ -> do
- (iface, mb_old_iface_hash, _details) <- liftIO $
- hscSimpleIface hsc_env tc_result summary mb_old_hash
+ (iface, _details) <- liftIO $
+ hscSimpleIface hsc_env tc_result summary
- liftIO $ hscMaybeWriteIface logger dflags True iface mb_old_iface_hash (ms_location summary)
+ liftIO $ hscMaybeWriteIface logger dflags True iface mb_old_hash (ms_location summary)
return $ HscUpdate iface
@@ -1554,16 +1554,14 @@ hscSimplify' plugins ds_result = do
hscSimpleIface :: HscEnv
-> TcGblEnv
-> ModSummary
- -> Maybe Fingerprint
- -> IO (ModIface, Maybe Fingerprint, ModDetails)
-hscSimpleIface hsc_env tc_result summary mb_old_iface
- = runHsc hsc_env $ hscSimpleIface' tc_result summary mb_old_iface
+ -> IO (ModIface, ModDetails)
+hscSimpleIface hsc_env tc_result summary
+ = runHsc hsc_env $ hscSimpleIface' tc_result summary
hscSimpleIface' :: TcGblEnv
-> ModSummary
- -> Maybe Fingerprint
- -> Hsc (ModIface, Maybe Fingerprint, ModDetails)
-hscSimpleIface' tc_result summary mb_old_iface = do
+ -> Hsc (ModIface, ModDetails)
+hscSimpleIface' tc_result summary = do
hsc_env <- getHscEnv
logger <- getLogger
details <- liftIO $ mkBootModDetailsTc logger tc_result
@@ -1574,7 +1572,7 @@ hscSimpleIface' tc_result summary mb_old_iface = do
mkIfaceTc hsc_env safe_mode details summary tc_result
-- And the answer is ...
liftIO $ dumpIfaceStats hsc_env
- return (new_iface, mb_old_iface, details)
+ return (new_iface, details)
--------------------------------------------------------------
-- BackEnd combinators