Negative numbers now show up as a constant instead of 0 - that number

Expect on constructors without field maps no longer panics

Expect on constructors with discard as assigned field names now no longer throws free unique
This commit is contained in:
microproofs
2023-04-30 14:44:54 -04:00
parent f601ff4703
commit d2dbae1cbf
4 changed files with 84 additions and 52 deletions

View File

@@ -202,6 +202,10 @@ impl<T> Term<T> {
pub fn is_unit(&self) -> bool {
matches!(self, Term::Constant(c) if c.as_ref() == &Constant::Unit)
}
pub fn is_int(&self) -> bool {
matches!(self, Term::Constant(c) if matches!(c.as_ref(), &Constant::Integer(_)))
}
}
impl<'a, T> Display for Term<T>