Improve free-variable handling for rnPat and friends (fixes Trac #1972)
authorsimonpj@microsoft.com <unknown>
Thu, 13 Dec 2007 14:02:13 +0000 (14:02 +0000)
committersimonpj@microsoft.com <unknown>
Thu, 13 Dec 2007 14:02:13 +0000 (14:02 +0000)
commit7f2909e06884a04199131407c12ba179d5886f46
treed0bd146cd74e4047deeff449b13b852186ef0bf5
parent1476e683b04147d9d505922951b6f70d752a6eb8
Improve free-variable handling for rnPat and friends (fixes Trac #1972)

As well as fixing the immediate problem (Trac #1972) this patch does
a signficant simplification and refactoring of pattern renaming.

Fewer functions, fewer parameters passed....it's all good.  But it
took much longer than I expected to figure out.

The most significant change is that the NameMaker type does *binding*
as well as *making* and, in the matchNameMaker case, checks for unused
bindings as well.  This is much tider.

(No need to merge to the 6.8 branch, but no harm either.)
compiler/rename/RnBinds.lhs
compiler/rename/RnEnv.lhs
compiler/rename/RnExpr.lhs
compiler/rename/RnPat.lhs
compiler/rename/RnTypes.lhs