[commit: ghc] master: Record usage information using GlobalRdrElt (3e94842)
git at git.haskell.org
git at git.haskell.org
Fri Oct 30 11:27:27 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/3e94842d4d1258fbd6a1202bf74d41ce1d01c753/ghc
>---------------------------------------------------------------
commit 3e94842d4d1258fbd6a1202bf74d41ce1d01c753
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Fri Oct 30 09:41:47 2015 +0000
Record usage information using GlobalRdrElt
This patch implements an improvment that I've wanted to do for ages, but
never gotten around to.
Unused imports are computed based on how imported entities occur (qualified,
unqualified). This info was accumulated in tcg_used_rdrnames :: Set RdrName.
But that was a huge pain, and it got worse when we introduced duplicate
record fields.
The Right Thing is to record tcg_used_gres :: [GlobalRdrElt], which records
the GRE *after* filtering with pickGREs. See Note [GRE filtering] in RdrName.
This is much, much bette. This patch deletes quite a bit of code, and is
conceptually much easier to follow.
Hooray. There should be no change in functionality.
>---------------------------------------------------------------
3e94842d4d1258fbd6a1202bf74d41ce1d01c753
compiler/basicTypes/RdrName.hs | 140 +++++++++++++--------
compiler/rename/RnEnv.hs | 88 ++++++-------
compiler/rename/RnNames.hs | 102 ++++-----------
compiler/rename/RnPat.hs | 2 +-
compiler/typecheck/TcCanonical.hs | 12 +-
compiler/typecheck/TcDeriv.hs | 9 +-
compiler/typecheck/TcExpr.hs | 5 +-
compiler/typecheck/TcRnDriver.hs | 14 +--
compiler/typecheck/TcRnMonad.hs | 7 +-
compiler/typecheck/TcRnTypes.hs | 34 +++--
compiler/typecheck/TcSMonad.hs | 10 +-
testsuite/tests/module/Mod136_A.hs | 4 +-
testsuite/tests/module/mod136.hs | 1 +
testsuite/tests/module/mod136.stderr | 2 +-
testsuite/tests/rename/should_compile/T4239.stdout | 2 +-
15 files changed, 183 insertions(+), 249 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 3e94842d4d1258fbd6a1202bf74d41ce1d01c753
More information about the ghc-commits
mailing list