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)
-------------------
-- 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
-- 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.
-- 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