mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 01:43:35 +00:00
compiler/typecheck_error_undef.m:
If we are reporting an error for a reference to an undefined predicate,
check whether any predicates exist whose names are "close enough"
to the name of the referenced predicate, and if yes, add to the
error message a line containing "(Did you mean x, y or z?)".
(Doing the same for references to undefined functions is future work.
The two are separate because things that look like function references
can also refer to e.g. data constructors.)
library/edit_distance.m:
Add this new module to implement the "close enough" check.
This new module is similar to the existing edit_seq.m module,
but it is designed to serve different requirements, and it seems to me
to be far from trivial to write code to meet both sets of requirements
at once.
library/library.m:
library/MODULES_DOC:
Include the new module in the standard library.
NEWS.md:
Announce the new library module.
tests/hard_coded/edit_distance_test_closest.{m,exp}:
tests/hard_coded/edit_distance_test_cost.{m,exp}:
Two new test cases, each of which tests one of the two predicates
exported by the new library module.
tests/hard_coded/Mmakefile:
Enable the new test cases.
tests/invalid/qual_basic_test2.err_exp:
tests/invalid/types2.err_exp:
tests/invalid/undef_symbol.err_exp:
tests/invalid_submodules/undef_mod_qual.err_exp:
Expect the new "did you mean" additions to error messages.
127 lines
1.5 KiB
Plaintext
127 lines
1.5 KiB
Plaintext
array.m
|
|
array2d.m
|
|
assoc_list.m
|
|
bag.m
|
|
benchmarking.m
|
|
bimap.m
|
|
bit_buffer.m
|
|
bit_buffer.read.m
|
|
bit_buffer.write.m
|
|
bitmap.m
|
|
bool.m
|
|
bt_array.m
|
|
builtin.m
|
|
calendar.m
|
|
char.m
|
|
construct.m
|
|
cord.m
|
|
counter.m
|
|
deconstruct.m
|
|
diet.m
|
|
digraph.m
|
|
dir.m
|
|
edit_distance.m
|
|
edit_seq.m
|
|
enum.m
|
|
eqvclass.m
|
|
exception.m
|
|
fat_sparse_bitset.m
|
|
fatter_sparse_bitset.m
|
|
float.m
|
|
gc.m
|
|
getopt.m
|
|
getopt_io.m
|
|
hash_table.m
|
|
injection.m
|
|
int.m
|
|
int8.m
|
|
int16.m
|
|
int32.m
|
|
int64.m
|
|
integer.m
|
|
io.m
|
|
io.call_system.m
|
|
io.environment.m
|
|
io.file.m
|
|
kv_list.m
|
|
lazy.m
|
|
library.m
|
|
list.m
|
|
map.m
|
|
math.m
|
|
maybe.m
|
|
mercury_term_lexer.m
|
|
mercury_term_parser.m
|
|
multi_map.m
|
|
one_or_more.m
|
|
one_or_more_map.m
|
|
ops.m
|
|
pair.m
|
|
parsing_utils.m
|
|
pprint.m
|
|
pqueue.m
|
|
pretty_printer.m
|
|
prolog.m
|
|
psqueue.m
|
|
queue.m
|
|
ra_list.m
|
|
random.m
|
|
random.sfc16.m
|
|
random.sfc32.m
|
|
random.sfc64.m
|
|
random.system_rng.m
|
|
ranges.m
|
|
rational.m
|
|
rbtree.m
|
|
require.m
|
|
rtree.m
|
|
set.m
|
|
set_bbbtree.m
|
|
set_ctree234.m
|
|
set_ordlist.m
|
|
set_tree234.m
|
|
set_unordlist.m
|
|
solutions.m
|
|
sparse_bitset.m
|
|
stack.m
|
|
std_util.m
|
|
store.m
|
|
stream.m
|
|
stream.string_writer.m
|
|
string.builder.m
|
|
string.m
|
|
table_statistics.m
|
|
term.m
|
|
term_context.m
|
|
term_conversion.m
|
|
term_int.m
|
|
term_subst.m
|
|
term_unify.m
|
|
term_vars.m
|
|
term_io.m
|
|
term_to_xml.m
|
|
thread.barrier.m
|
|
thread.channel.m
|
|
thread.closeable_channel.m
|
|
thread.future.m
|
|
thread.m
|
|
thread.mvar.m
|
|
thread.semaphore.m
|
|
time.m
|
|
tree234.m
|
|
tree_bitset.m
|
|
type_desc.m
|
|
uint.m
|
|
uint8.m
|
|
uint16.m
|
|
uint32.m
|
|
uint64.m
|
|
unit.m
|
|
univ.m
|
|
varset.m
|
|
version_array.m
|
|
version_array2d.m
|
|
version_bitmap.m
|
|
version_hash_table.m
|
|
version_store.m
|