mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
library/array.m:
library/assoc_list.m:
library/bimap.m:
library/bitmap.m:
library/construct.m:
library/deconstruct.m:
library/dir.m:
library/hash_table.m:
library/injection.m:
library/io.stream_db.m:
library/kv_list.m:
library/list.m:
library/map.m:
library/robdd.m:
library/stream.string_writer.m:
library/term_conversion.m:
library/term_to_xml.m:
library/tree234.m:
library/type_desc.m:
library/version_hash_table.m:
For nearly every ordinary function in this directory that can fail in its
primary mode (all of which were semidet functions),
- provide a semidet predicate as an alternative, if it did not
already exist,
- implement the function in terms of the predicate, instead of vice versa,
- mark the semidet function as obsolete in favor of the semidet predicate
version,
- fix all the resulting warnings, and then
- comment out the obsolete pragmas (at least for now).
Note that this diff does not touch the semidet function in the
enum typeclass, or the functions that implement that method
in instances.
NEWS.md:
Announce the new predicates in the (documented) modules of the library.
browser/term_rep.m:
compiler/lp_rational.m:
compiler/mcsolver.m:
compiler/mode_ordering.m:
compiler/mode_robdd.equiv_vars.m:
compiler/mode_robdd.implications.m:
compiler/old_type_constraints.m:
compiler/pickle.m:
compiler/prog_event.m:
compiler/type_ctor_info.m:
compiler/var_table.m:
tests/hard_coded/bitmap_empty.m:
tests/hard_coded/construct_mangle.m:
tests/hard_coded/construct_packed.m:
tests/hard_coded/construct_test.m:
tests/hard_coded/dummy_type_construct.m:
tests/hard_coded/expand.m:
tests/hard_coded/foreign_enum_rtti.m:
tests/hard_coded/subtype_rtti.m:
tests/hard_coded/term_to_univ_test.m:
tests/hard_coded/type_to_term.m:
tests/hard_coded/type_to_term_bug.m:
Stop calling the semidet functions from the library that were temporarily
marked obsolete.
In a few places, add explicit type qualification to avoid warnings
about unresolved polymorphism.
tests/hard_coded/test_injection.exp:
Expect an abort message from the predicate version of a semidet function.
tests/declarative_debugger/ho_2.exp2:
Update this .exp file for a previous commit.
48 lines
3.0 KiB
Plaintext
48 lines
3.0 KiB
Plaintext
Test "is_empty" passed.
|
|
Test "not is_empty" passed.
|
|
Test "set same" passed.
|
|
Test "update new" passed.
|
|
Test "forward_search succ 1" passed.
|
|
Test "forward_search succ 2" passed.
|
|
Test "forward_search fail" passed.
|
|
Test "reverse_search succ 1" passed.
|
|
Test "reverse_search succ 2" passed.
|
|
Test "reverse_search fail" passed.
|
|
Test "lookup throw" threw exception: software_error("map.lookup: key not found\n\tKey Type: int\n\tKey Value: 10\n\tValue Type: int")
|
|
Test "reverse_lookup throw" threw exception: software_error("map.lookup: key not found\n\tKey Type: int\n\tKey Value: 1\n\tValue Type: int")
|
|
Test "keys" passed.
|
|
Test "values" passed.
|
|
Test "insert fail on key" passed.
|
|
Test "insert fail on value 1" passed.
|
|
Test "insert fail on value 2" passed.
|
|
Test "insert throw on key" threw exception: software_error("map.det_insert: key already present\n\tKey Type: int\n\tKey Value: 2\n\tValue Type: int")
|
|
Test "insert throw on value 1" threw exception: software_error("map.det_insert: key already present\n\tKey Type: int\n\tKey Value: 20\n\tValue Type: int")
|
|
Test "insert throw on value 2" threw exception: software_error("map.det_insert: key already present\n\tKey Type: int\n\tKey Value: 21\n\tValue Type: int")
|
|
Test "update fail on key" passed.
|
|
Test "update fail on value 1" passed.
|
|
Test "update fail on value 2" passed.
|
|
Test "update fail on value 3" passed.
|
|
Test "update fail on value 4" passed.
|
|
Test "update throw on key" threw exception: software_error("map.det_update: key not found\n\tKey Type: int\n\tKey Value: -1\n\tValue Type: int")
|
|
Test "update throw on value 1" threw exception: software_error("map.det_insert: key already present\n\tKey Type: int\n\tKey Value: 20\n\tValue Type: int")
|
|
Test "update throw on value 2" threw exception: software_error("map.det_insert: key already present\n\tKey Type: int\n\tKey Value: 21\n\tValue Type: int")
|
|
Test "update throw on value 3" threw exception: software_error("map.det_insert: key already present\n\tKey Type: int\n\tKey Value: 30\n\tValue Type: int")
|
|
Test "update throw on value 4" threw exception: software_error("map.det_insert: key already present\n\tKey Type: int\n\tKey Value: 31\n\tValue Type: int")
|
|
Test "set succeed 1" passed.
|
|
Test "set succeed 2" passed.
|
|
Test "set succeed 3" passed.
|
|
Test "set fail 1" passed.
|
|
Test "set fail 2" passed.
|
|
Test "set throw 1" threw exception: software_error("injection.det_set: value is already associated with another key")
|
|
Test "set throw 2" threw exception: software_error("injection.det_set: value is already associated with another key")
|
|
Test "delete_key" passed.
|
|
Test "delete_value succ" passed.
|
|
Test "delete_value throw" threw exception: software_error("predicate `injection.delete_value\'/3: value is associated with a key")
|
|
Test "merge no overlap" passed.
|
|
Test "overlay no overlap" passed.
|
|
Test "overlay key overlap" passed.
|
|
Test "map_keys injective" passed.
|
|
Test "map_keys non-injective" passed.
|
|
Test "map_values injective" passed.
|
|
Test "map_values non-injective" threw exception: software_error("injection.map_values: merged two values with different keys")
|