[properly report ambiguity on re-defined top-level names
John Meacham <john@repetae.net>**20120129162743
 Ignore-this: cb1c73f0b3516dd12a39793f88412777
] hunk ./lib/base/Text/Printf.hs 20
-import Prelude
+import Prelude hiding(toInt)
hunk ./lib/jhc/Jhc/List.hs 8
-
hunk ./lib/jhc/Jhc/List.hs 10
-
hunk ./lib/jhc/Jhc/List.hs 15
-
hunk ./lib/jhc/Jhc/List.hs 82
-
hunk ./lib/jhc/Jhc/List.hs 84
-
hunk ./lib/jhc/Jhc/List.hs 105
-
hunk ./lib/jhc/Jhc/List.hs 110
-
hunk ./lib/jhc/Jhc/List.hs 164
-
hunk ./lib/jhc/Jhc/List.hs 168
-
hunk ./lib/jhc/Jhc/List.hs 174
-
hunk ./lib/jhc/Jhc/List.hs 180
-
hunk ./lib/jhc/Jhc/List.hs 186
-
-
hunk ./lib/jhc/Jhc/List.hs 190
-
-
hunk ./lib/jhc/Jhc/List.hs 203
-
hunk ./lib/jhc/Jhc/List.hs 227
-
hunk ./lib/jhc/Jhc/List.hs 234
-
hunk ./lib/jhc/Jhc/List.hs 239
-
hunk ./lib/jhc/Jhc/List.hs 248
-
hunk ./lib/jhc/Jhc/List.hs 250
-
-
hunk ./lib/jhc/Jhc/List.hs 277
-
-
hunk ./lib/jhc/Jhc/List.hs 299
-
hunk ./lib/jhc/Jhc/List.hs 305
-
hunk ./lib/jhc/Jhc/String.hs 15
-type Addr__ = BitsPtr_
-
hunk ./lib/jhc/Jhc/Type/Basic.hs 21
-type Addr__ = Addr_
+type Addr__ = BitsPtr_
hunk ./lib/jhc/Prelude/CType.hs 71
-elem    :: Char -> [Char] -> Bool
-elem _ []	= False
-elem x (y:ys)
-    | x == y = True
-    | otherwise = f y ys where
-        f y _ | x == y = True
-        f _ (y:ys) = f y ys
-        f _ [] = False
-
hunk ./lib/jhc/Prelude/IO.hs 40
-
hunk ./lib/jhc/Prelude/IO.hs 52
-
hunk ./lib/jhc/Prelude/IO.hs 66
-
hunk ./lib/jhc/Prelude/IO.hs 77
-
hunk ./lib/jhc/Prelude/IO.hs 95
-writeFile'  :: FilePath -> String -> Addr__ -> IO ()
+writeFile'  :: FilePath -> String -> Addr_ -> IO ()
hunk ./lib/jhc/Prelude/IO.hs 109
-
-
hunk ./src/FrontEnd/Rename.hs 76
- --           | otherwise = error $ "strong bad: " ++ show hsName
hunk ./src/FrontEnd/Rename.hs 81
---    let cn k (Right x) (Right y) | x /= y = Left $ ambig k [x,y]
---        cn _ _ x@Left {} = x
---        cn _ x _ = x
-    withSubTable (fromList nmap) action
-    --local ( \e -> e { envNameMap = Map.unionWithKey cn (Map.map Right (fromList nmap)) (envNameMap e) }) action
+    let amb k x y | x == y = x
+        amb k (Right n1) (Right n2) = Left (ambig k [n1,n2])
+        amb _ _ l  = l
+        
+    local ( \e -> e { envNameMap = Map.unionWithKey amb (Map.map Right $ Map.fromList nmap) (envNameMap e) }) action