Files
mercury/tests/invalid/lambda_syntax_error.m
Fergus Henderson 1f45bdca59 Improve the error messages for syntax errors in lambda
Estimated hours taken: 0.5

compiler/typecheck.m:
	Improve the error messages for syntax errors in lambda
	expressions and field selection/update expressions.

tests/invalid/Mmakefile:
tests/invalid/field_syntax_error.m:
tests/invalid/field_syntax_error.err_exp:
tests/invalid/lambda_syntax_error.m:
tests/invalid/lambda_syntax_error.err_exp:
	Regression tests.
2000-09-18 16:38:27 +00:00

17 lines
484 B
Mathematica

:- module lambda_syntax_error.
:- interface.
:- some [T] func baz(int) = T.
:- some [T] func baz2(int) = T.
:- some [T] func baz3(int) = T.
:- some [T] func baz4(int) = T.
:- implementation.
:- import_module int.
baz(X) = (pred(Y) :- X > Y). % modes & determinism not specified
baz2(X) = (pred(Y::in) :- X > Y). % determinism not specified
baz3(X) = (pred(Y) is semidet :- X > Y). % mode not specified
baz4(X) = (pred(A) = B :- X = A + B). % mixing `func' and `pred' notation