mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 11:23:46 +00:00
... in some previously overlooked test cases.
tests/debugger/Mercury.options:
tests/debugger/Mmakefile:
tests/debugger/completion.completion_helper_1.m:
tests/debugger/completion.completion_helper_2.completion_helper_3.m:
tests/debugger/completion.completion_helper_2.m:
tests/debugger/completion.exp:
tests/debugger/completion.inp:
tests/debugger/completion.m:
Rename completion.sub1.m to completion.completion_helper_1.m,
rename completion.sub2.m to completion.completion_helper_2.m, and
rename completion.sub2.sub3.m to
completion.completion_helper_2.completion_helper_3.m.
tests/debugger/poly_io_retry_1.exp:
tests/debugger/poly_io_retry_1.inp:
tests/debugger/poly_io_retry_1.m:
tests/debugger/poly_io_retry_2.exp:
tests/debugger/poly_io_retry_2.inp:
tests/debugger/poly_io_retry_2.m:
Rename poly_io_retry/poly_io_retry2 to poly_io_retry_[12].
tests/debugger/shallow.exp:
tests/debugger/shallow.m:
tests/debugger/shallow_helper_1.m:
Rename shallow2.m to shallow_helper_1.m.
tests/debugger/user_event_1.exp:
tests/debugger/user_event_1.inp:
tests/debugger/user_event_1.m:
Rename user_event to user_event_1, due to the existence of user_event_2.
tests/general/Mmakefile:
tests/general/det_complicated_unify_1.exp:
tests/general/det_complicated_unify_1.m:
tests/general/det_complicated_unify_2.exp:
tests/general/det_complicated_unify_2.m:
Rename det_complicated_unify/det_complicated_unify2 to
det_complicated_unify_[12]. Note: only det_complicated_unify_1
is currently enabled.
tests/general/double_error_1.exp:
tests/general/double_error_1.m:
tests/general/double_error_2.exp:
tests/general/double_error_2.m:
Rename double_error/double_error2 as double_error_[12].
tests/general/liveness_1.exp:
tests/general/liveness_1.m:
tests/general/liveness_2.exp:
tests/general/liveness_2.m:
Rename liveness/liveness2 as liveness_[12].
tests/hard_coded/Mercury.options:
tests/hard_coded/Mmakefile:
tests/hard_coded/user_defined_equality_1.exp:
tests/hard_coded/user_defined_equality_1.m:
tests/hard_coded/user_defined_equality_2.exp:
tests/hard_coded/user_defined_equality_2.m:
Rename user_defined_equality/user_defined_equality2 as
user_defined_equality_[12].
tests/tabling/Mmakefile:
tests/tabling/expand_tuple_1.exp:
tests/tabling/expand_tuple_1.m:
tests/tabling/expand_tuple_2.exp:
tests/tabling/expand_tuple_2.m:
Rename expand_tuple/expand_tuple2 as expand_tuple_[12].
41 lines
959 B
Mathematica
41 lines
959 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% This is a regression test.
|
|
%
|
|
% The Mercury compiler of 27/10/2000 failed this test due to overeager
|
|
% specialization of unifications involving no-tag types with user-defined
|
|
% equality.
|
|
|
|
:- module user_defined_equality_2.
|
|
:- interface.
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is cc_multi.
|
|
|
|
:- implementation.
|
|
|
|
:- import_module std_util.
|
|
|
|
:- type foo
|
|
---> foo(int)
|
|
where equality is foo_equal.
|
|
|
|
:- pred foo_equal(foo::in, foo::in) is semidet.
|
|
|
|
foo_equal(_, _) :-
|
|
semidet_succeed.
|
|
|
|
main(!IO) :-
|
|
( if unify_no_tag(foo(1), foo(2)) then
|
|
io.write_string("yes\n", !IO)
|
|
else
|
|
io.write_string("no\n", !IO)
|
|
).
|
|
|
|
:- pred unify_no_tag(T::in, T::in) is semidet.
|
|
:- pragma type_spec(unify_no_tag/2, T = foo).
|
|
|
|
unify_no_tag(T, T).
|