Anyone with comments? On Sat, Aug 10, 2024 at 10:50 PM Brandon Allbery <allber...@gmail.com> wrote:
> I've been sitting on a potential proposal to enable per-import disabling > of -Wunused-imports and -Wmissing-import-lists for a while now, and > https://mail.haskell.org/pipermail/haskell-cafe/2024-August/136852.html > has me thinking of moving forward with it. > > It turns out that this would be very easy to implement within ghc, as the > ideclImplicit field of ideclExt (itself a field of ImportDecl) already does > what's needed; it exists to track the implicit Prelude import, and would be > almost trivial to set when parsing an import. I did a check to see if > anything used it as a proxy for "this is the Prelude", and everything that > wants that explicitly looks for the Prelude module, with one exception: HIE > information excludes anything from an import with ideclImplicit set. > > My questions are: > 1. Is this (omitting imports with ideclImplicit) even sane? What happens > with HIE information when Prelude definitions are used in the module? > 2. Is this use of ideclImplicit going to cause problems with my proposed > use? > 2a. Should HIE be checking explicitly for Prelude as other things do, or > is it more correct for other imports with ideclImplicit set to be treated > the same way? > > -- > brandon s allbery kf8nh > allber...@gmail.com > -- brandon s allbery kf8nh allber...@gmail.com
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs