-
Notifications
You must be signed in to change notification settings - Fork 38
feat(rengine): add KnownApplications
resugaring
#1656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dfd1e10
to
87cfd73
Compare
87cfd73
to
594348c
Compare
6dad272
to
6ba5f6a
Compare
a0f860c
to
9ddecbe
Compare
e3ea02f
to
fe7f7a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good! Just a few nits and questions.
dd13dab
to
119cd10
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good!
Putting this back to draft. |
This PR introduces a new
KnownApplications
resugaring.It transforms every
ExprKind::App
node (representing function applications) into the new variantResugaredExprKind::FunApp
.FunApp
serves as an enum capturing a list of known function and operator names (e.g., addition, dereference, multiplication, etc.), along with an array of arguments. The arity of each function is encoded in the type system.This resugaring is especially useful for printers.
It also generalizes and replaces the existing
BinOp
resugaring. As such, this PR removesBinOp
and updates its usage in the Lean backend accordingly.