diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-02-16 09:34:43 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-02-16 10:42:04 +0000 |
commit | eda2c7316883e7d107755c08ad696e669ead0447 (patch) | |
tree | ea12a185eca4b4c83e98041241e9339ba11ba243 /compiler/iface/FlagChecker.hs | |
parent | 0bca11de22e7ad274608dc1198e51f68aae91694 (diff) | |
download | haskell-eda2c7316883e7d107755c08ad696e669ead0447.tar.gz |
Be less conservative about recompiling after changes to -main-is (#5878)
Diffstat (limited to 'compiler/iface/FlagChecker.hs')
-rw-r--r-- | compiler/iface/FlagChecker.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/iface/FlagChecker.hs b/compiler/iface/FlagChecker.hs index 5e4a7092bf..fecd001238 100644 --- a/compiler/iface/FlagChecker.hs +++ b/compiler/iface/FlagChecker.hs @@ -10,6 +10,7 @@ import Binary import BinIface () import DynFlags import HscTypes +import Module import Name import Fingerprint -- import Outputable @@ -21,11 +22,11 @@ import System.FilePath (normalise) -- | Produce a fingerprint of a @DynFlags@ value. We only base -- the finger print on important fields in @DynFlags@ so that -- the recompilation checker can use this fingerprint. -fingerprintDynFlags :: DynFlags -> (BinHandle -> Name -> IO ()) +fingerprintDynFlags :: DynFlags -> Module -> (BinHandle -> Name -> IO ()) -> IO Fingerprint -fingerprintDynFlags DynFlags{..} nameio = - let mainis = (mainModIs, mainFunIs) +fingerprintDynFlags DynFlags{..} this_mod nameio = + let mainis = mainModIs == this_mod -- see #5878 -- pkgopts = (thisPackage dflags, sort $ packageFlags dflags) safeHs = setSafeMode safeHaskell -- oflags = sort $ filter filterOFlags $ flags dflags |