diff --git a/compiler/module_qual.qual_errors.m b/compiler/module_qual.qual_errors.m index 6bc86a99f..803208042 100644 --- a/compiler/module_qual.qual_errors.m +++ b/compiler/module_qual.qual_errors.m @@ -352,6 +352,9 @@ report_invalid_user_inst(_SymName, _Insts, ErrorContext, !Specs) :- warn_unused_interface_import(ParentModuleName, ImportedModuleName - ImportContexts, !Specs) :- + UNUSED_IMPORT Harmonize the operation of this predicate with + % the operation of maybe_generate_redundant_avail_warnings + % in unused_imports.m. ImportContexts = one_or_more(HeadContext, TailContexts), HeadPieces = [words("In module"), qual_sym_name(ParentModuleName), suffix(":"), nl, diff --git a/compiler/unused_imports.m b/compiler/unused_imports.m index 371e97685..8dbc8e4b9 100644 --- a/compiler/unused_imports.m +++ b/compiler/unused_imports.m @@ -216,6 +216,9 @@ compare_avails(AvailA, AvailB, Result) :- maybe_generate_redundant_avail_warnings(_ModuleName, [], _, !Specs). maybe_generate_redundant_avail_warnings(ModuleName, [Avail | Avails], !.PrevAvails, !Specs) :- + % XXX UNUSED_IMPORT Harmonize the operation of this predicate with + % the operation of warn_unused_interface_import + % in module_qual.qual_errors.m. list.foldl(add_msg_if_avail_as_general(ModuleName, Avail), !.PrevAvails, [], PrevMsgs), (