Commit 6e55d34a authored by's avatar
Browse files

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.
parent 1c9ffbe6
......@@ -886,7 +886,7 @@ checkShadowedNames doc_str (global_env,local_env) loc_rdr_names
; mappM_ check_shadow loc_rdr_names }
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 ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment