Commit 872a4a0f authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

Check for overlap-flag differences in hi files

	MERGE TO STABLE

I'd forgotten to compare the per-instance overlap flag when 
comparing interface files, and that meant that consequential
recompilations weren't being triggered when the only change
was to add -fallow-overlapping-instances

Fixes Trac bug #824
parent 3eeeb57d
......@@ -800,7 +800,7 @@ eqWith :: [IfaceTvBndr] -> [IfaceTvBndr] -> (EqEnv -> IfaceEq) -> IfaceEq
eqWith = eq_ifTvBndrs emptyEqEnv
-----------------------
eqIfInst d1 d2 = bool (ifDFun d1 == ifDFun d2)
eqIfInst d1 d2 = bool (ifDFun d1 == ifDFun d2 && ifOFlag d1 == ifOFlag d2)
-- All other changes are handled via the version info on the dfun
eqIfRule (IfaceRule n1 a1 bs1 f1 es1 rhs1 o1)
......
......@@ -482,7 +482,9 @@ addVersionInfo (Just old_iface@(ModIface { mi_mod_vers = old_mod_vers,
-------------------
-- Adding version info
new_version = bumpVersion old_mod_vers
new_version = bumpVersion old_mod_vers -- Start from the old module version, not from zero
-- so that if you remove f, and then add it again,
-- you don't thereby reduce f's version number
add_vers decl | occ `elemOccSet` changed_occs = new_version
| otherwise = expectJust "add_vers" (old_decl_vers occ)
-- If it's unchanged, there jolly well
......
......@@ -108,7 +108,7 @@ data Instance
-- This is used for versioning; the instance decl is
-- considered part of the defn of n when computing versions
--
-- Nothing The head mentions nothing defined in this modle
-- Nothing The head mentions nothing defined in this module
--
-- If a module contains any orphans, then its interface file is read
-- regardless, so that its instances are not missed.
......@@ -240,6 +240,7 @@ data OverlapFlag
-- Without the Incoherent flag, we'd complain that
-- instantiating 'b' would change which instance
-- was chosen
deriving( Eq )
instance Outputable OverlapFlag where
ppr NoOverlap = empty
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment