summaryrefslogtreecommitdiff
path: root/testsuite/tests/cabal/t19518/r/R.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-07-06 12:08:08 +0100
committerMatthew Pickering <matthewtpickering@gmail.com>2021-07-06 12:13:16 +0100
commitc82f840c4b66dbefef4df60229449e7139065af5 (patch)
tree7fbf53b96eb03262f1b4d392b81c239d53ffdde1 /testsuite/tests/cabal/t19518/r/R.hs
parent9b1d9cbfa7a1beecc4125e35562f542b30ee4f2e (diff)
downloadhaskell-wip/unused-packages-reexport.tar.gz
driver: Fix interaction of -Wunused-packages and reexported-moduleswip/unused-packages-reexport
Spurious warnings were previously emitted if an import came from a reexport due to how -Wunused-packages were implemented. Removing the dependency would cause compilation to fail. The fix is to reimplement the warning a bit more directly, by searching for which package each import comes from using the normal module finding functions rather than consulting the EPS. This has the advantage that the check could be performed at any time after downsweep rather than also relying on a populated EPS. Fixes #19518 and #19777
Diffstat (limited to 'testsuite/tests/cabal/t19518/r/R.hs')
-rw-r--r--testsuite/tests/cabal/t19518/r/R.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/tests/cabal/t19518/r/R.hs b/testsuite/tests/cabal/t19518/r/R.hs
new file mode 100644
index 0000000000..ac9344a524
--- /dev/null
+++ b/testsuite/tests/cabal/t19518/r/R.hs
@@ -0,0 +1,3 @@
+module R where
+import P
+r = p