From: simonpj@microsoft.com Date: Wed, 2 Apr 2008 15:34:10 +0000 (+0000) Subject: Fix Trac #2137: report correct location for shadowed binding X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6e55d34a67e0fee21e4dc672bf5b33f03d8d1834;p=ghc-hetmet.git Fix Trac #2137: report correct location for shadowed binding The error message generation for a shadowed binding was plain wrong, at least where the shadowed binding isn't top-level. Just a typo really -- the fix is trivial. --- diff --git a/compiler/rename/RnEnv.lhs b/compiler/rename/RnEnv.lhs index 59451fc..35d3fcc 100644 --- a/compiler/rename/RnEnv.lhs +++ b/compiler/rename/RnEnv.lhs @@ -886,7 +886,7 @@ checkShadowedNames doc_str (global_env,local_env) loc_rdr_names ; mappM_ check_shadow loc_rdr_names } where check_shadow (loc, occ) - | Just n <- mb_local = complain [ptext SLIT("bound at") <+> ppr loc] + | Just n <- mb_local = complain [ptext SLIT("bound at") <+> ppr (nameSrcLoc n)] | not (null gres) = complain (map pprNameProvenance gres) | otherwise = return () where