Fix Trac #3640, plus associated refactoring
authorsimonpj@microsoft.com <unknown>
Thu, 5 Nov 2009 16:55:25 +0000 (16:55 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 5 Nov 2009 16:55:25 +0000 (16:55 +0000)
commitdf8b00e014ad8280354dd3fab6e6df0a52377627
tree8bb7662d65eee27149e25506d3c4f565b355fc3e
parent1b62d143650231ead9571ce1ebea12ac8c547a82
Fix Trac #3640, plus associated refactoring

In fixing this bug (to do with record puns), I had the usual rush of
blood to the head, and I did quite a bit of refactoring in the way
that duplicate/shadowed names are reported.

I think the result is shorter as well as clearer.

In one place I found it convenient for the renamer to use the ErrCtxt
carried in the monad.  (The renamer used not to have such a context,
but years ago the typechecker and renamer monads became one, so now it
does.)   So now it's availble if you want it in future.
compiler/rename/RnBinds.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnExpr.lhs
compiler/rename/RnPat.lhs
compiler/rename/RnSource.lhs
compiler/rename/RnTypes.lhs
compiler/typecheck/TcRnMonad.lhs