From 6e55d34a67e0fee21e4dc672bf5b33f03d8d1834 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 2 Apr 2008 15:34:10 +0000 Subject: [PATCH] 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. --- compiler/rename/RnEnv.lhs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 1.7.10.4