mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 05:13:48 +00:00
tests/declarative_debugger/*.m:
tests/exceptions/*.m:
tests/general/*.m:
tests/grade_subdirs/*.m:
tests/purity/*.m:
tests/submodules/*.m:
tests/typeclasses/*.m:
Update programming style.
tests/declarative_debugger/*.inp:
Update line numbers in breakpoint commands.
tests/declarative_debugger/*.exp:
Update expected line numbers.
tests/exceptions/Mercury.options:
tests/general/Mercury.options:
Disable some warnings that are irrelevant to the test.
34 lines
811 B
Mathematica
34 lines
811 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% This tests that the compiler handles deterministic complicated
|
|
% unifications on enums and compound types correctly.
|
|
% (Version 0.4 of the compiler failed this test.)
|
|
|
|
:- module det_complicated_unify.
|
|
:- interface.
|
|
:- import_module io.
|
|
|
|
:- pred main(io::di, io::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
:- type foo
|
|
---> foo(bar).
|
|
:- type bar
|
|
---> bar.
|
|
|
|
main(!IO) :-
|
|
p(foo(bar), foo(bar)), q(bar, bar),
|
|
io.write_string("worked\n", !IO).
|
|
|
|
:- pred p(foo::in(bound(foo(bound(bar)))), foo::in(bound(foo(bound(bar)))))
|
|
is det.
|
|
|
|
p(X, X).
|
|
|
|
:- pred q(bar::in(bound(bar)), bar::in(bound(bar))) is det.
|
|
|
|
q(X, X).
|