do not print unbound vars at toplevel

This commit is contained in:
Mark Thom
2019-03-23 09:43:05 -06:00
parent 380375228b
commit 0b79ae0524
2 changed files with 14 additions and 1 deletions

View File

@@ -373,6 +373,8 @@ pub fn print(wam: &mut Machine, result: EvalSession) {
match result {
EvalSession::InitialQuerySuccess(alloc_locs, mut heap_locs) => {
loop {
wam.remove_unbound_vars(&mut heap_locs);
if wam.or_stack_is_empty() {
if heap_locs.is_empty() {
println!("true.");