mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-24 22:04:13 +00:00
Estimated hours taken: 2 Branches: main Replace deprecated mode and inst syntax in most of the test suite. TODO: Alter valid/mode_syntax.m when we start issuing warnings about the deprecated syntax. tests/*/*.m: Replace deprecated mode and inst syntax. Replace some uses of `:' as the module qualifier.
32 lines
489 B
Mathematica
32 lines
489 B
Mathematica
:- module same_length_2.
|
|
:- interface.
|
|
:- import_module list.
|
|
|
|
:- mode my_input_list_skel == list_skel >> list_skel.
|
|
:- mode my_output_list_skel == free >> list_skel.
|
|
:- mode my_list_skel_output == list_skel >> ground.
|
|
|
|
:- pred p is semidet.
|
|
|
|
:- pred p2(list(T)::my_output_list_skel) is nondet.
|
|
|
|
:- implementation.
|
|
|
|
:- pred q(list(T)::my_input_list_skel).
|
|
:- pred r(list(T)::my_output_list_skel).
|
|
|
|
q(_X) :- q([]).
|
|
r(X) :- r(X).
|
|
|
|
p :-
|
|
r(X),
|
|
q(X).
|
|
|
|
p2(X) :-
|
|
r(X),
|
|
q(X)
|
|
;
|
|
r(X),
|
|
q(X).
|
|
|