correct dcg handling of cuts

This commit is contained in:
Mark Thom
2019-10-04 15:41:48 -06:00
parent d4f9d18149
commit 1569cac98f
3 changed files with 5 additions and 3 deletions

View File

@@ -22,10 +22,11 @@ freeze(X, Goal) :-
Fresh = X.
gather_freeze_goals(Attrs, _) -->
{ var(Attrs), ! }.
{ var(Attrs) },
!.
gather_freeze_goals([frozen(X) | _], Var) -->
[freeze(Var, X)],
{ ! }.
!.
gather_freeze_goals([_ | Attrs], Var) -->
gather_freeze_goals(Attrs, Var).