correct dcg handling of cuts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "scryer-prolog"
|
||||
version = "0.8.100"
|
||||
version = "0.8.101"
|
||||
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
||||
build = "build.rs"
|
||||
repository = "https://github.com/mthom/scryer-prolog"
|
||||
|
||||
@@ -100,6 +100,7 @@ expand_body_term((P ; Q), (PModTerm ; QModTerm), N0, N) :-
|
||||
PModTerm = PModTerm0,
|
||||
N = N1
|
||||
).
|
||||
expand_body_term(!, !, N, N) :- !.
|
||||
expand_body_term(CommaTerm, ModTerm, N, N) :-
|
||||
CommaTerm =.. [{} | BodyTerms], !,
|
||||
comma_ify(BodyTerms, ModTerm).
|
||||
|
||||
@@ -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).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user