Files
mercury/tests/valid/constrained_poly_bound_arg.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

34 lines
859 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module constrained_poly_bound_arg.
:- interface.
:- type val_closure(X1)
---> val_closure(pred(X1)).
:- type closure_list(X2)
---> nil
; list(X2, val_closure(closure_list(X2))).
:- inst val_closure(X3) == bound(error3.val_closure(pred(out(X3)) is det)).
:- inst closure_list(X4) == bound(error3.nil ;
error3.list(X4, val_closure(closure_list(X4)))).
:- implementation.
:- pred eval(X5, X5).
:- mode eval(in(X6 =< ground), out(X6 =< ground)) is det.
eval(X, X).
:- pred m(closure_list(X8), closure_list(X8)).
:- mode m(in(closure_list(X9 =< ground)), out(closure_list(X9 =< ground)))
is det.
m(CCL, RCL) :-
eval(CCL, RCL).