Skip to content
Snippets Groups Projects
Commit 3e94842d authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

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.
parent 9376249b
No related branches found
No related tags found
No related merge requests found
Showing with 189 additions and 255 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment