`ideclImplicit` in compiler/GHC/Iface/Ext/Ast.hs?
Brandon Allbery
allbery.b at gmail.com
Mon Feb 13 19:14:49 UTC 2023
I'm researching a potential GHC proposal to allow "Prelude-like"
imports, which in practice means silencing warnings about implicit use
of symbols from them (-Wmissing-import-lists and similar).
So far, it looks like `ideclImplicit` does almost exactly what I want
and all I need is syntax to set it on imports other than the implicit
Prelude import. With one notable exception: around
compiler/GHC/Iface/Ext/Ast.hs line 326 (HEAD as of Saturday) there is
a use that appears to intend to exclude the implicit Prelude import,
without conditionalizing on Prelude like e.g.
compiler/GHC/Tc/Module.hs lines 1685--1687. I have several questions
about it.
1. The implicit import, but not explicit imports, are excluded from
the extended .hi file? This seems wrong-ish to me; I'm wondering if
it's actually looking to do something else such as strip it down to
only the symbols in use. But I don't really know what the code here is
supposed to do.
2. Should other "implicit" imports also be excluded the same way?
--
brandon s allbery kf8nh
allbery.b at gmail.com
More information about the ghc-devs
mailing list