implement ListElisionPolicy to restore previous printer behavior

This commit is contained in:
Mark
2023-09-30 16:00:15 -06:00
parent 25afc11168
commit 62c23166fa
9 changed files with 134 additions and 98 deletions

View File

@@ -583,7 +583,7 @@ impl MachineState {
seen_set: &mut IndexSet<HeapCellValue, S>,
value: HeapCellValue,
) {
let mut iter = stackful_preorder_iter(&mut self.heap, &mut self.stack, value);
let mut iter = stackful_preorder_iter::<NonListElider>(&mut self.heap, &mut self.stack, value);
while let Some(value) = iter.next() {
let value = unmark_cell_bits!(value);
@@ -793,7 +793,7 @@ impl MachineState {
let mut seen_set = IndexSet::new();
{
let mut iter = stackful_post_order_iter(&mut self.heap, &mut self.stack, term);
let mut iter = stackful_post_order_iter::<NonListElider>(&mut self.heap, &mut self.stack, term);
while let Some(value) = iter.next() {
if iter.parent_stack_len() >= max_depth {