From: Mark Thom Date: Sat, 2 May 2020 03:40:36 +0000 (-0600) Subject: cut after compound check in (;)/2 only after semicolon_compound_selector succeeds X-Git-Tag: v0.8.123~77 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=81f9666e8216cd75a9fabcd6fd6c4c023ed27171;p=scryer-prolog.git cut after compound check in (;)/2 only after semicolon_compound_selector succeeds --- diff --git a/Cargo.lock b/Cargo.lock index 5c39e78d..c81f6123 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -512,6 +512,8 @@ dependencies = [ [[package]] name = "prolog_parser" version = "0.8.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf0562d1a4c03539b8dae2eb6c7ce733f1a0bd3bdb476aaa3682414d7d540517" dependencies = [ "lexical", "num-rug-adapter", diff --git a/src/prolog/lib/builtins.pl b/src/prolog/lib/builtins.pl index a6c12e31..cb676b9b 100644 --- a/src/prolog/lib/builtins.pl +++ b/src/prolog/lib/builtins.pl @@ -234,8 +234,8 @@ semicolon_compound_selector(';'(G2, G3), G4, B) :- :- non_counted_backtracking (;)/3. ;(G1, G4, B) :- compound(G1), - !, - semicolon_compound_selector(G1, G4, B). + semicolon_compound_selector(G1, G4, B), + !. ;(G1, G2, B) :- G1 == !, !, '$set_cp'(B), call(G2). ;(G1, G2, B) :-