[Git][ghc/ghc][master] Don't warn unused-imports with used generated imports

Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 9e857171 by Brandon Chinn at 2025-08-20T11:47:46-04:00 Don't warn unused-imports with used generated imports Fixes #21730 * The old notion of "implicit" import has been renamed to "generated". See Note [Generated imports] in GHC.Hs.ImpExp. * ImportMap now keeps track of generated and user-written imports separately. This avoids the fake SrcSpan we used to give the implicit Prelude import, and the hack that went with it. * -ddump-minimal-imports now considers generated imports (but still only warns on + prints user-written imports) * bestImport considers generated imports to take priority over user-written imports. - - - - - 62 changed files: - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser/Header.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Types/Name/Reader.hs - ghc/GHCi/UI.hs - testsuite/tests/gadt/T12468.stderr - testsuite/tests/ghc-e/should_fail/T24172.stderr - testsuite/tests/ghci/scripts/T8353.stderr - testsuite/tests/ghci/scripts/ghci038.stdout - testsuite/tests/module/mod150.stderr - testsuite/tests/module/mod151.stderr - testsuite/tests/module/mod152.stderr - testsuite/tests/module/mod153.stderr - testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T19082.stderr - testsuite/tests/perf/compiler/hard_hole_fits.stderr - testsuite/tests/plugins/Makefile - + testsuite/tests/plugins/T21730-plugin/Makefile - + testsuite/tests/plugins/T21730-plugin/Setup.hs - + testsuite/tests/plugins/T21730-plugin/T21730-plugin.cabal - + testsuite/tests/plugins/T21730-plugin/T21730_Plugin.hs - + testsuite/tests/plugins/T21730.hs - testsuite/tests/plugins/all.T - testsuite/tests/quotes/LiftErrMsg.stderr - testsuite/tests/quotes/LiftErrMsgDefer.stderr - testsuite/tests/quotes/LiftErrMsgTyped.stderr - testsuite/tests/rename/should_compile/T22513d.stderr - testsuite/tests/rename/should_compile/T22513e.stderr - testsuite/tests/rename/should_compile/T22513f.stderr - testsuite/tests/rename/should_compile/T22513g.stderr - testsuite/tests/rename/should_compile/T22513h.stderr - testsuite/tests/rename/should_compile/T22513i.stderr - testsuite/tests/rename/should_compile/rn039.ghc.stderr - testsuite/tests/rename/should_fail/T15487.stderr - testsuite/tests/rename/should_fail/T18740a.stderr - testsuite/tests/rename/should_fail/rnfail044.stderr - testsuite/tests/safeHaskell/flags/SafeFlags17.stderr - testsuite/tests/th/T10267.stderr - testsuite/tests/th/T14627.stderr - testsuite/tests/th/T15321.stderr - testsuite/tests/typecheck/should_compile/T13050.stderr - testsuite/tests/typecheck/should_compile/T14273.stderr - testsuite/tests/typecheck/should_compile/T14590.stderr - testsuite/tests/typecheck/should_compile/T25180.stderr - testsuite/tests/typecheck/should_compile/T9497a.stderr - testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr - testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr - testsuite/tests/typecheck/should_fail/T14884.stderr - testsuite/tests/typecheck/should_fail/T21130.stderr - testsuite/tests/typecheck/should_fail/T23739b.stderr - testsuite/tests/typecheck/should_fail/T23739c.stderr - testsuite/tests/typecheck/should_fail/T9497d.stderr - testsuite/tests/typecheck/should_fail/tcfail037.stderr - testsuite/tests/typecheck/should_run/T9497a-run.stderr - testsuite/tests/typecheck/should_run/T9497b-run.stderr - testsuite/tests/typecheck/should_run/T9497c-run.stderr - testsuite/tests/vdq-rta/should_fail/T23738_fail_pun.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9e85717194c0872eeb56132120382774... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9e85717194c0872eeb56132120382774... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)