[project @ 2003-07-22 14:24:57 by simonmar]
authorsimonmar <unknown>
Tue, 22 Jul 2003 14:24:57 +0000 (14:24 +0000)
committersimonmar <unknown>
Tue, 22 Jul 2003 14:24:57 +0000 (14:24 +0000)
Fix a nasty bug in eq_ufVar, which meant that unfoldings were
comparing equal when non-local names in the unfolding had changed,
which could lead to erroneously avoiding recompilation.

This bug could cause bad behaviour along the lines of "my program was
segfaulting, but I did make clean; make and now it works!".

merge to STABLE

ghc/compiler/hsSyn/HsCore.lhs

index 86f657b..27b6ae6 100644 (file)
@@ -318,7 +318,7 @@ eq_ufVar :: (NamedThing name, Ord name) => EqHsEnv name -> name -> name -> Bool
 -- differences when comparing interface files
 eq_ufVar env n1 n2 = case lookupFM env n1 of
                       Just n1 -> check n1
-                      Nothing -> check n2
+                      Nothing -> check n1
    where
        check n1 = eqNameByOcc (getName n1) (getName n2)