X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnEnv.lhs;h=b4dafd35486a57805a31e40e4c5f6ddc78ac5cdb;hb=46f02d59813499ba2aa44e7831e0b69ec6d8f25d;hp=56f18ab763fdf31ba998f9bf449375b96801c947;hpb=6c06fdc7ad20682f0f52b5a78e5e3487a2ed047b;p=ghc-hetmet.git diff --git a/compiler/rename/RnEnv.lhs b/compiler/rename/RnEnv.lhs index 56f18ab..b4dafd3 100644 --- a/compiler/rename/RnEnv.lhs +++ b/compiler/rename/RnEnv.lhs @@ -904,6 +904,8 @@ checkShadowedNames doc_str (global_env,local_env) loc_rdr_names ; mappM_ check_shadow loc_rdr_names } where check_shadow (loc, occ) + | startsWithUnderscore occ = return () -- Do not report shadowing for "_x" + -- See Trac #3262 | Just n <- mb_local = complain [ptext (sLit "bound at") <+> ppr (nameSrcLoc n)] | otherwise = do { gres' <- filterM is_shadowed_gre gres ; complain (map pprNameProvenance gres') } @@ -1007,7 +1009,7 @@ warnUnusedBinds names = mappM_ warnUnusedName (filter reportable names) | isWiredInName name = False -- Don't report unused wired-in names -- Otherwise we get a zillion warnings -- from Data.Tuple - | otherwise = reportIfUnused (nameOccName name) + | otherwise = not (startsWithUnderscore (nameOccName name)) -------------------------