mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 05:13:48 +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.
18 lines
302 B
Mathematica
18 lines
302 B
Mathematica
% regression test for inference and lambda modes.
|
|
:- module lambda_inference.
|
|
|
|
:- interface.
|
|
|
|
|
|
:- pred ok(int, pred(int)).
|
|
:- mode ok(in, free >> (pred(in) is semidet)) is semidet.
|
|
|
|
:- implementation.
|
|
|
|
ok(Var, (pred(X::in) is semidet :- X = 5)) :-
|
|
inferred(Var).
|
|
|
|
:- pred inferred(int).
|
|
|
|
inferred(5).
|