mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 13:55:07 +00:00
Regression test.
Estimated hours taken: 0.05 tests/valid/lambda_inference.m Regression test.
This commit is contained in:
@@ -23,6 +23,7 @@ SOURCES= \
|
||||
higher_order3.m\
|
||||
implied_mode.m \
|
||||
indexing.m \
|
||||
lambda_inference.m\
|
||||
loop.m \
|
||||
multidet_prune1.m \
|
||||
multidet_test.m \
|
||||
|
||||
17
tests/valid/lambda_inference.m
Normal file
17
tests/valid/lambda_inference.m
Normal file
@@ -0,0 +1,17 @@
|
||||
% 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).
|
||||
Reference in New Issue
Block a user