Note an opportunity for improvement.

This commit is contained in:
Zoltan Somogyi
2018-10-30 00:36:13 +11:00
parent ecdf8ae7dd
commit b51e7322d0
2 changed files with 6 additions and 0 deletions

View File

@@ -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,

View File

@@ -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),
(