[m-rev.] diff: Delete unused imports.

Peter Wang novalazy at gmail.com
Wed Mar 30 13:26:36 AEDT 2022


On Wed, 30 Mar 2022 12:53:43 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> 
> 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.

But does a module C that only calls the predicate/function exported by
module B also need to import module A? The type defined in module A is
never explicitly named in module C, nor constructed/deconstructed in
module C, so does it count as a "use"? The reference manual doesn't
explain what it considers a "use".

Peter


More information about the reviews mailing list