<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, 28 Nov 2025 at 23:15, Zoltan Somogyi <<a href="mailto:zoltan.somogyi@runbox.com">zoltan.somogyi@runbox.com</a>> wrote:<br></div><div><br></div><div> > Merge --warn-interface-imports into --warn-unused-interface-imports.<br><br>...<br><br>> diff --git a/NEWS.md b/NEWS.md<br>> index 1cf3dbb0a..b0ae3b257 100644<br>> --- a/NEWS.md<br>> +++ b/NEWS.md<br>> @@ -1637,6 +1637,12 @@ Changes to the Mercury compiler<br>>    The compiler still accepts the old names, but we intend to remove them<br>>    after the next stable release.<br>>  <br>> +* We have changed the preferred name of the --warn-interface-imports option<br>> +  to --warn-unused-interface-imports, which is more descriptive.<br><br>Quote the option names using backticks.<br><br>...<br><br>> diff --git a/compiler/module_qual.m b/compiler/module_qual.m<br>> index 9c202dd7f..2222c943f 100644<br>> --- a/compiler/module_qual.m<br>> +++ b/compiler/module_qual.m<br>> @@ -53,18 +53,18 @@<br>>  %<br>>  % For the same reason (we don't know what modules predicate names,<br>>  % function names and function symbols in goals may refer to), this package<br>> -% cannot implement any equivalent of --warn-interface-imports that would<br>> +% cannot implement any equivalent of --warn-unused-interface-imports that would<br>>  % report unnecessary imports in the *implementation* section of a module.<br>>  %<br>>  % If the --warn-unused-imports option is set, then unused_imports.m<br>> -% can generate all the warnings we would, but it can generate *better*<br>> -% messages, since unlike the code here, it can report that an imported module<br>> -% is unused *anywhere* in the module. However, even if --warn-unused-imports<br>> -% *is* set, the code in unused_imports.m won't be invoked if we stop<br>> -% compilation before its normal invocation time, due to e.g. type or more<br>> -% errors. What we should do is generate warnings here; print them if we<br>> -% stop before the unused_imports pass; throw them away if we *do* get to<br>> -% that pass. We don't (yet) do this.<br>> +% can generate all the warnings we would, but it can generate *more* messages,<br>> +% since unlike the code here, it can report that an imported module is unused<br>> +% *anywhere* in the module. However, even if --warn-unused-imports *is* set,<br>> +% the code in unused_imports.m won't be invoked if we stop compilation<br>> +% before its normal invocation time, due to e.g. type or more<br><br>Did you mean mode errors there?<br><br>> +% errors. We therefore print warnings about unneeded imports in the interface<br>> +% section only if the option controlling its operation dictates that<br>> +% the code in unused_imports.m won't be invoked.<br>>  %<br>>  %---------------------------------------------------------------------------%<br><br>That looks fine otherwise.<br><br>Julien.<br></div></div></div>