feat(uplc): add Case and Const terms

- parsering
- interning
- flat encoding and decoding
- pretty printing
- debruijn conversion

Co-authored-by: Lucas Rosa <x@rvcas.dev>
This commit is contained in:
microproofs
2023-08-01 22:33:25 -04:00
committed by Kasey
parent dfe433ea46
commit e566c4e1de
9 changed files with 213 additions and 8 deletions

View File

@@ -48,6 +48,18 @@ impl Interner {
Term::Force(term) => self.term(Rc::make_mut(term)),
Term::Error => (),
Term::Builtin(_) => (),
Term::Constr { fields, .. } => {
for field in fields {
self.term(field);
}
}
Term::Case { constr, branches } => {
self.term(Rc::make_mut(constr));
for branch in branches {
self.term(branch);
}
}
}
}