unused import
[ghc-hetmet.git] / compiler / iface / MkIface.lhs
index cafb6b6..3ff30d9 100644 (file)
@@ -279,8 +279,10 @@ mkIface hsc_env maybe_old_iface
 
                ; decls  = [ tyThingToIfaceDecl ext_nm_rhs thing 
                           | thing <- typeEnvElts type_env, 
-                            not (isImplicitName (getName thing)) ]
+                            let name = getName thing,
+                            not (isImplicitName name || isWiredInName name) ]
                        -- Don't put implicit Ids and class tycons in the interface file
+                       -- Nor wired-in things; the compiler knows about them anyhow
 
                ; fixities    = [(occ,fix) | FixItem occ fix _ <- nameEnvElts fix_env]
                ; deprecs     = mkIfaceDeprec src_deprecs
@@ -480,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