Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Sep 29, 2024
1 parent b9b8550 commit 02e4eaa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions samples/tco.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
test2(0) :- !, statistics, nl, fail.
test2(N) :- f, N1 is N-1, test2(N1).

% No local vars & no structures, yet not recovered...

f(1).

test3(0) :- !, statistics, nl, fail.
Expand Down
2 changes: 1 addition & 1 deletion src/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ static void commit_frame(query *q)
// Matching a fact (see disjunction in bif_control.c)...
// !q->has_vars ??? test for no vars left ?

if (q->pl->opt && !body && last_match && !q->has_vars && !cl->nbr_vars) {
if (q->pl->opt && !body && last_match && !q->has_indirects && !cl->nbr_vars) {
leave_predicate(q, q->st.pr);
drop_choice(q);
//cut(q); // ???
Expand Down

0 comments on commit 02e4eaa

Please sign in to comment.