mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 03:43:51 +00:00
library/builtin:
Delete the promise_only_solution/1 and promise_only_solution_io/4. Both
have have been marked as obsolete since 2015.
Also delete the non-public impure versions of those, get_one_solution/1
and get_one_solution_io/4. Implementing the pure versions was the only
use of these.
compiler/hlds_goal.m:
Delete a reference to promise_only_solution in a comment.
tests/declarative_debugger/trust.exp:
tests/declarative_debugger/trust.inp:
tests/declarative_debugger/trust_1.m:
Replace a call to promise_only_solution/1; this does simplify this test
a little, but does not affect what the trust_1 module was testing, namely
the user-defined comparison on the type exported by that module.
tests/declarative_debugger/exceptions.m:
tests/hard_coded/myset.m:
tests/hard_coded/user_compare.m:
tests/valid_seq/intermod_nested_module_bug2.m:
extras/curs/samples/nibbles.m:
Replace calls to the now deleted predicates.
26 lines
601 B
Mathematica
26 lines
601 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
:- module trust_1.
|
|
|
|
:- interface.
|
|
|
|
:- import_module string.
|
|
|
|
:- type w
|
|
---> w(string)
|
|
where comparison is w_cmp.
|
|
|
|
:- pred w_cmp(builtin.comparison_result::uo, w::in, w::in) is det.
|
|
|
|
:- implementation.
|
|
|
|
w_cmp(R, W1, W2) :-
|
|
promise_equivalent_solutions [R1] (
|
|
W1 = w(S1),
|
|
W2 = w(S2),
|
|
compare(R1, to_upper(S1) : string, to_upper(S2))
|
|
),
|
|
R = unsafe_promise_unique(R1).
|