From: Mark Date: Tue, 3 Oct 2023 18:04:10 +0000 (-0600) Subject: correct cycle detection in ground/1 (#2073) X-Git-Tag: remove~55 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=fd14869ddc1f75361d043b6843badd96435f6249;p=scryer-prolog.git correct cycle detection in ground/1 (#2073) --- diff --git a/src/machine/machine_state_impl.rs b/src/machine/machine_state_impl.rs index 34b9d55a..c8d7a4dc 100644 --- a/src/machine/machine_state_impl.rs +++ b/src/machine/machine_state_impl.rs @@ -1648,7 +1648,7 @@ impl MachineState { } } - if value.is_compound(iter.heap) { + if value.is_ref() { if visited.contains(&value) { for _ in stack_len..iter.stack_len() { iter.pop_stack(); @@ -1686,7 +1686,7 @@ impl MachineState { }, Ok(Number::Integer(n)) => { let b: u8 = (&*n).try_into().unwrap(); - + bytes.push(b); } _ => {}