X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnPat.lhs;h=63672553501c4ccd7f83d57c5766b942076264b7;hb=2662dbc5b2c30fc11ccb99e7f9b2dba794d680ba;hp=6ab4890b66fe0b4ac7ee59e3769116d2890ab76c;hpb=8ec978161d50e476e327b59bdf1a2d5e57705609;p=ghc-hetmet.git diff --git a/compiler/rename/RnPat.lhs b/compiler/rename/RnPat.lhs index 6ab4890..6367255 100644 --- a/compiler/rename/RnPat.lhs +++ b/compiler/rename/RnPat.lhs @@ -220,9 +220,7 @@ rnPats ctxt pats thing_inside -- Nor can we check incrementally for shadowing, else we'll -- complain *twice* about duplicates e.g. f (x,x) = ... ; let names = collectPatsBinders pats' - ; checkDupNames doc_pat names - ; checkShadowedNames doc_pat envs_before - [(nameSrcSpan name, nameOccName name) | name <- names] + ; addErrCtxt doc_pat $ checkDupAndShadowedNames envs_before names ; thing_inside pats' } } where doc_pat = ptext (sLit "In") <+> pprMatchContext ctxt