mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 03:43:51 +00:00
22 lines
535 B
Mathematica
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).
|