]> Repositorios git - scryer-prolog.git/commitdiff
correct dcg handling of cuts
authorMark Thom <[email protected]>
Fri, 4 Oct 2019 21:41:48 +0000 (15:41 -0600)
committerMark Thom <[email protected]>
Fri, 4 Oct 2019 21:41:48 +0000 (15:41 -0600)
Cargo.toml
src/prolog/lib/dcgs.pl
src/prolog/lib/freeze.pl

index 936e91ea0fea2c2f742d8209030a1642eee2fc34..4ae1b84603cd9382d6c09f0142e7d99d593ca7d0 100644 (file)
@@ -1,6 +1,6 @@
 [package]
 name = "scryer-prolog"
-version = "0.8.100"
+version = "0.8.101"
 authors = ["Mark Thom <[email protected]>"]
 build = "build.rs"
 repository = "https://github.com/mthom/scryer-prolog"
index 626a6b8bc69d07bac2e91c791dd7aad5d2bced1a..9bad9df447bc2e4d8e09b7c3ecb921e40750b7b1 100644 (file)
@@ -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).
index 4a3c05b81343a1dbcaa65caa44b50e953fbb50d1..96e3dda5b9f01d775dcd5b5847345d5e1c734cb2 100644 (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).