diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-12-07 23:20:42 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-12-07 23:20:43 -0500 |
commit | f2bad7e1069e61955c16e4e73a254095807d863a (patch) | |
tree | ef5cd0198b014e88d439eb2e5e1126014157a719 | |
parent | 7d96d2816d11bc067ce5b7d68b4a6f0fb1cf0259 (diff) | |
download | haskell-f2bad7e1069e61955c16e4e73a254095807d863a.tar.gz |
Rename "changed" to "no-change" in HscMain
hscSimpleIface is returning a bool for whether there were _no changes_
in the iface file. The same bool is called "no_change_at_all" in
mkIface_, and "no_change" in hscWriteIface and other functions. However
it is called "changed" in HscMain.finish and hscMaybeWriteIface, which
is confusing because "changed" and "no_change" have opposite meanings.
This patch renames "changed" to "no_change" to fix this.
Reviewers: simonpj, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5416
-rw-r--r-- | compiler/main/HscMain.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index d7cebd00fc..38dc727983 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -743,10 +743,10 @@ finish summary tc_result mb_old_hash = do (_, HsBootFile) -> HscUpdateBoot (_, HsigFile) -> HscUpdateSig _ -> panic "finish" - (iface, changed, details) <- liftIO $ + (iface, no_change, details) <- liftIO $ hscSimpleIface hsc_env tc_result mb_old_hash - return (iface, changed, details, hsc_status) - (iface, changed, details, hsc_status) <- + return (iface, no_change, details, hsc_status) + (iface, no_change, details, hsc_status) <- -- we usually desugar even when we are not generating code, otherwise -- we would miss errors thrown by the desugaring (see #10600). The only -- exceptions are when the Module is Ghc.Prim or when @@ -761,25 +761,25 @@ finish summary tc_result mb_old_hash = do else do plugins <- liftIO $ readIORef (tcg_th_coreplugins tc_result) desugared_guts <- hscSimplify' plugins desugared_guts0 - (iface, changed, details, cgguts) <- + (iface, no_change, details, cgguts) <- liftIO $ hscNormalIface hsc_env desugared_guts mb_old_hash - return (iface, changed, details, HscRecomp cgguts summary) + return (iface, no_change, details, HscRecomp cgguts summary) else mk_simple_iface - liftIO $ hscMaybeWriteIface dflags iface changed summary + liftIO $ hscMaybeWriteIface dflags iface no_change summary return ( hsc_status , HomeModInfo {hm_details = details, hm_iface = iface, hm_linkable = Nothing}) hscMaybeWriteIface :: DynFlags -> ModIface -> Bool -> ModSummary -> IO () -hscMaybeWriteIface dflags iface changed summary = +hscMaybeWriteIface dflags iface no_change summary = let force_write_interface = gopt Opt_WriteInterface dflags write_interface = case hscTarget dflags of HscNothing -> False HscInterpreted -> False _ -> True in when (write_interface || force_write_interface) $ - hscWriteIface dflags iface changed summary + hscWriteIface dflags iface no_change summary -------------------------------------------------------------- -- NoRecomp handlers |