mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
library/hash_table.m:
Switch to using kv_lists to represent items in overflowing buckets.
This is both cleaner and more efficient.
Give many types, function symbols, predicates, functions and variables
more meaningful names.
Add XXXs to mark some significant potential problems.
When an operation has both function and predicate forms, make the
function form forward to the predicate form, as we do in the rest
of the standard library.
Make equality testing between a key in a hash bucket and a search key
explicit in all cases.
library/kv_list.m:
Add some functionality that hash_table.m now needs from kv_lists.
library/assoc_list.m:
Add some functionality that kv_list.m now has, to maintain parity
between the two modules.
NEWS:
Announce the changes to assoc_list.m. (The changes to kv_list are moot,
since it is a new module.)
tests/hard_coded/hash_table_test.{m,exp}:
Make the progress messages output by this test more meaningful,
and update its programming style.
6 lines
117 B
Plaintext
6 lines
117 B
Plaintext
Inserting elements
|
|
Looking up elements
|
|
Deleting some elements
|
|
Setting negative elements
|
|
Looking up negative elements
|