Files
mercury/tests/invalid/conflicting_tabling_pragmas.m
Zoltan Somogyi 3dc4babb24 Update the style of more test cases.
And update expected output files for changes in line numbers.
2021-07-27 13:29:46 +10:00

24 lines
456 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module conflicting_tabling_pragmas.
:- interface.
:- func fac(int) = int.
:- implementation.
:- import_module int.
:- pragma memo(fac/1).
:- pragma loop_check(fac/1).
fac(X) = Y :-
( if X =< 0 then
Y = 0
else
Y = X * fac(X - 1)
).