[project @ 1998-03-04 10:16:05 by sof]
authorsof <unknown>
Wed, 4 Mar 1998 10:16:05 +0000 (10:16 +0000)
committersof <unknown>
Wed, 4 Mar 1998 10:16:05 +0000 (10:16 +0000)
addAvailEnv: restrict previous change to not redo
duplicate checks.

ghc/compiler/rename/RnNames.lhs

index 127eef7..25d28e0 100644 (file)
@@ -419,10 +419,11 @@ addAvailEnv warn_dups ie env avail
    occ_avail = nameOccName (availName avail)
    occ_ie    = ieOcc ie
    key
-    | occ_ie == occ_avail = occ_avail
-    | otherwise           = occ_ie 
+    | not warn_dups || occ_ie == occ_avail = occ_avail
+    | otherwise                            = occ_ie 
         -- export item is a class method, use export occ name instead.
-
+        -- (this is only needed to get more precise warnings about
+       --  duplicates.)
    elt  = (ie,avail,reports_on)
 
    reports_on