Robustify the treatement of DFunUnfolding
[ghc-hetmet.git] / compiler / iface / LoadIface.lhs
index 3a4cfe5..ce08f6d 100644 (file)
@@ -42,7 +42,7 @@ import Module
 import Maybes
 import ErrUtils
 import Finder
-import LazyUniqFM
+import UniqFM
 import StaticFlags
 import Outputable
 import BinIface
@@ -257,6 +257,7 @@ loadInterface doc_str mod from
                }
 
        ; updateEps_  $ \ eps -> 
+           if elemModuleEnv mod (eps_PIT eps) then eps else
            eps { 
              eps_PIT          = extendModuleEnv (eps_PIT eps) mod final_iface,
              eps_PTE          = addDeclsToPTE   (eps_PTE eps) new_eps_decls,