]> Repositorios git - scryer-prolog.git/commitdiff
properly report deterministically successful queries
authorMark Thom <[email protected]>
Sat, 23 Feb 2019 02:38:49 +0000 (19:38 -0700)
committerMark Thom <[email protected]>
Sat, 23 Feb 2019 02:38:49 +0000 (19:38 -0700)
src/prolog/write.rs

index 96224d5f8778ad14f3b6b20cdf5195b4950d9ec3..6b39d3824fb35ca4486037efc51cd083aabcd1c5 100644 (file)
@@ -365,9 +365,12 @@ fn next_step(mut stdout: RawTerminal<std::io::Stdout>) -> ContinueResult
 pub fn print(wam: &mut Machine, result: EvalSession) {
     match result {
         EvalSession::InitialQuerySuccess(alloc_locs, mut heap_locs) => {
-            if wam.or_stack_is_empty() && heap_locs.is_empty() {
+            if wam.or_stack_is_empty() {
                 println!("true.");
-                return;
+
+                if heap_locs.is_empty() {
+                    return;
+                }
             }
 
             if !wam.or_stack_is_empty() {