implement unify_ginteger to address FIXME in skip_max_list_cycle

This commit is contained in:
Mark Thom
2025-09-15 21:58:38 -07:00
parent 24f431e2ca
commit 72cdba82f5
5 changed files with 37 additions and 25 deletions

View File

@@ -241,6 +241,22 @@ macro_rules! is_fy {
};
}
#[derive(Debug)]
pub enum GInteger {
Integer(TypedArenaPtr<Integer>),
Fixnum(Fixnum),
}
impl GInteger {
#[inline]
pub fn to_literal(self) -> Literal {
match self {
GInteger::Integer(integer) => Literal::Integer(integer),
GInteger::Fixnum(fixnum) => Literal::Fixnum(fixnum),
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum RegType {
Perm(usize),