Allow comparisons with stream terms

This commit is contained in:
Adrián Arroyo Calle
2023-07-04 17:33:48 +02:00
parent d079a18459
commit 076a75d138
2 changed files with 155 additions and 1 deletions

View File

@@ -616,6 +616,18 @@ impl HeapCellValue {
Some(TermOrderCategory::Compound)
}
}
HeapCellValueTag::Cons => {
let ptr = cell_as_untyped_arena_ptr!(self);
match_untyped_arena_ptr!(ptr,
(ArenaHeaderTag::Stream, stream) => {
match stream.options().get_alias() {
Some(_) => Some(TermOrderCategory::Atom),
None => Some(TermOrderCategory::Compound)
}
},
_ => None
)
}
_ => {
None
}