diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-07-06 12:08:08 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2021-07-06 12:13:16 +0100 |
commit | c82f840c4b66dbefef4df60229449e7139065af5 (patch) | |
tree | 7fbf53b96eb03262f1b4d392b81c239d53ffdde1 /testsuite/tests/cabal/t19518/r/R.hs | |
parent | 9b1d9cbfa7a1beecc4125e35562f542b30ee4f2e (diff) | |
download | haskell-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.hs | 3 |
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 |