Files
mercury/tests/valid/higher_order3.m
Zoltan Somogyi c03b11ca48 Update the style of more test cases.
And updated expected outputs for changed line numbers.
2021-07-27 19:29:21 +10:00

22 lines
535 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
%
% Tests the case where a higher-order specialization needs type specialization.
:- module higher_order3.
:- interface.
:- pred bar is semidet.
:- implementation.
:- import_module list.
bar :-
foo((pred(X::in) is semidet :- X = [_ | _]), []).
:- pred foo(pred(T)::in(pred(in) is semidet), T::in) is semidet.
foo(P, T) :-
call(P, T).