mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-12 12:26:29 +00:00
18 lines
300 B
Mathematica
18 lines
300 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, lambda([X::in] is semidet, X = 5)) :-
|
|
inferred(Var).
|
|
|
|
:- pred inferred(int).
|
|
|
|
inferred(5).
|