record compaction depth after reduce_op if '|' an operator (#1905)

This commit is contained in:
Mark
2023-09-23 00:19:54 -06:00
parent c547f67c54
commit 1c8cd85f6c
2 changed files with 43 additions and 9 deletions

View File

@@ -808,7 +808,7 @@ pub fn source_arity(terms: &[Term]) -> usize {
terms.len()
}
fn unfold_by_str_once(term: &mut Term, s: Atom) -> Option<(Term, Term)> {
pub(crate) fn unfold_by_str_once(term: &mut Term, s: Atom) -> Option<(Term, Term)> {
if let Term::Clause(_, ref name, ref mut subterms) = term {
if let Some(last_arg) = subterms.last() {
if let Term::Literal(_, Literal::CodeIndex(_)) = last_arg {