[m-rev.] diff: Delete unused imports.
Zoltan Somogyi
zoltan.somogyi at runbox.com
Wed Mar 30 12:53:43 AEDT 2022
On Wed, 30 Mar 2022 12:41:16 +1100, Peter Wang <novalazy at gmail.com> wrote:
> Do you mean that call_gen.m _should_ import hlds.vartypes because it
> contains a call to proc_info_get_vartypes, and one of the arguments
> of that call has a type defined in hlds.vartypes?
>
> So far, by my understanding, a variable merely having a certain type
> would not be considered a "use" of that type.
The main reason why you have to import a module A in the interface
of module B is that one of the arguments of a predicate or function
exported by module B refers to a type defined in module A.
Even for non-argument variables, the code generator needs to know
some things about the type of each variable, mainly its size, so it knows
how to store it. This is a use, though in the implementation section.
> > That discussion on oct 8 was about a description of the problem I added
> > as a comment on an import in hlds_out_module.m, which exhibits
> > the same problem. Would people be ok with me fixing this problem
> > using the first approach outlined in that comment? The discussion
> > ended in october without a decision on that.
>
> It seems fine.
>
> (I had trouble finding the discussion; the date was actually 2021-08-10,
> the thread subject: for post-commit review: "unused" eqv types)
Sorry, Thunderbird showed me the date as 10-08-2021, and I misread it.
Zoltan.
More information about the reviews
mailing list