summaryrefslogtreecommitdiff
path: root/testsuite/tests/module/Mod136_A.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-10-30 09:41:47 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-10-30 09:45:49 +0000
commit3e94842d4d1258fbd6a1202bf74d41ce1d01c753 (patch)
tree703ec106f907a72be0d4349a31ca33c44651ee48 /testsuite/tests/module/Mod136_A.hs
parent9376249b6b78610db055a10d05f6592d6bbbea2f (diff)
downloadhaskell-3e94842d4d1258fbd6a1202bf74d41ce1d01c753.tar.gz
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.
Diffstat (limited to 'testsuite/tests/module/Mod136_A.hs')
-rw-r--r--testsuite/tests/module/Mod136_A.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/tests/module/Mod136_A.hs b/testsuite/tests/module/Mod136_A.hs
index a69d8ee1a3..00cf2c90f1 100644
--- a/testsuite/tests/module/Mod136_A.hs
+++ b/testsuite/tests/module/Mod136_A.hs
@@ -1,3 +1,5 @@
-module Mod136_A (module Data.List) where
+module Mod136_A ( module Data.List ) where
+ -- Only things in scope unqualified (from the Prelude)
+ -- and qualified Data.List.x, will be exported
import qualified Data.List