From 0f01d376187b8baf39f9ab6018c5fae23e7fac55 Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Fri, 22 Feb 2019 19:38:49 -0700 Subject: [PATCH] properly report deterministically successful queries --- src/prolog/write.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/prolog/write.rs b/src/prolog/write.rs index 96224d5f..6b39d382 100644 --- a/src/prolog/write.rs +++ b/src/prolog/write.rs @@ -365,9 +365,12 @@ fn next_step(mut stdout: RawTerminal) -> 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() { -- 2.54.0