compiler/pred_table.m:
When we find more than one match for a predicate or function signature,
we used to generate an error message, print it, and then abort
compilation. Fix this by returning the error message to be handled
by our callers.
The compiler now has to pick one of the matches to continue with.
The compiler's pick (the first match) may not be the match intended
by the programmer, and it is possible that the compiler will later generate
some error messages that would not happen if we picked the match
intended by the programmer. We therefore warn the programmer about
this possibility.
compiler/purity.m:
compiler/resolve_unify_functor.m:
Include the error messages now returned by pred_table.m among
all the other error messages generated by the purity pass,
which, amongst other things, does the last part of the job
of the typechecker.
compiler/intermod.m:
Ignore the errors caused by unresolved overloading when generating
.opt files. They will be reported when the compiler tries to generate
target language code.
library/list.m:
Add three related utility predicates that we discussed earlier,
each of which was needed by one version or another of the code
for constructing the error message in pred_table.m.
NEWS:
Announce the additions to list.m.
tests/invalid_submodules/unresolved_overloading.{m,err_exp}:
Expect the updated error message, and the *absence* of a compiler abort.
This is to compile them with "mmake -j1", and thus avoid the intermittent
failures caused by interface files of nested submodules not being ready
when another job, executed in parallel by mmake, wants to read them.
tests/invalid_submodules/children.m:
tests/invalid_submodules/children2.m:
tests/invalid_submodules/duplicate_module.m:
tests/invalid_submodules/duplicate_module_test.err_exp:
tests/invalid_submodules/duplicate_module_test.m:
tests/invalid_submodules/exported_unify3.err_exp:
tests/invalid_submodules/exported_unify3.err_exp2:
tests/invalid_submodules/exported_unify3.m:
tests/invalid_submodules/func_class.err_exp:
tests/invalid_submodules/func_class.m:
tests/invalid_submodules/import_in_parent.err_exp:
tests/invalid_submodules/import_in_parent.m:
tests/invalid_submodules/missing_parent_import.err_exp:
tests/invalid_submodules/missing_parent_import.m:
tests/invalid_submodules/nested_impl_in_int.err_exp:
tests/invalid_submodules/nested_impl_in_int.m:
tests/invalid_submodules/sub_a.m:
tests/invalid_submodules/sub_c.err_exp:
tests/invalid_submodules/sub_c.m:
tests/invalid_submodules/undef_mod_qual.err_exp:
tests/invalid_submodules/undef_mod_qual.m:
tests/invalid_submodules/unresolved_overloading.err_exp:
tests/invalid_submodules/unresolved_overloading.m:
Move these files, which contain the source code and expected outputs
of the affected test cases, from the invalid directory to the new
invalid_submodules directory.
tests/invalid/Mercury.options:
tests/invalid/Mmakefile:
Delete any mentions of the moved test cases.
Improve sh programming style in actions.
tests/invalid_submodules/Mercury.options:
tests/invalid_submodules/Mmakefile:
List *only* the moved test cases. Specify the -j1 flag for mmake.
tests/Mmakefile:
tools/bootcheck:
Mention the new test directory.
Request that the list of test directories in these two places be kept
in sync.
Note that the feedback test directory is not yet ready.