]> Repositorios git - scryer-prolog.git/commitdiff
check for True or False Query Resolution unconditionally
authorMark <[email protected]>
Mon, 29 Jan 2024 22:06:56 +0000 (15:06 -0700)
committerMark <[email protected]>
Mon, 29 Jan 2024 22:06:56 +0000 (15:06 -0700)
src/machine/lib_machine.rs

index 2279d667a148cfcabda93d323dee04292911b8c5..5f34f1271765ddb7cc364c41d431adfb06f34f4e 100644 (file)
@@ -156,17 +156,17 @@ impl Machine {
             };
             */
 
-            if term_write_result.var_dict.is_empty() {
-                if self.machine_st.p == LIB_QUERY_SUCCESS {
+            if self.machine_st.p == LIB_QUERY_SUCCESS {
+                if term_write_result.var_dict.is_empty() {
                     matches.push(QueryResolutionLine::True);
                     break;
-                } else if self.machine_st.p == BREAK_FROM_DISPATCH_LOOP_LOC {
-                    // NOTE: only print results on success
-                    // self.machine_st.fail = false;
-                    // println!("b == stub_b");
-                    matches.push(QueryResolutionLine::False);
-                    break;
                 }
+            } else if self.machine_st.p == BREAK_FROM_DISPATCH_LOOP_LOC {
+                // NOTE: only print results on success
+                // self.machine_st.fail = false;
+                // println!("b == stub_b");
+                matches.push(QueryResolutionLine::False);
+                break;
             }
 
             let mut bindings: BTreeMap<String, Value> = BTreeMap::new();