-
Notifications
You must be signed in to change notification settings - Fork 106
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
refactor: parentheticals KISS #4900
Conversation
this now should pass all tests
@@ -2584,8 +2584,8 @@ and validate_parenthetical env typ_opt = function | |||
| _ -> () | |||
end; | |||
let [@warning "-8"] par_infer env { it = ObjE (bases, fields); _ } = | |||
let checked = T.[ { lab = "cycles"; typ = nat; src = empty_src} | |||
; { lab = "timeout"; typ = nat32; src = empty_src} | |||
let checked = T.[ { lab = "cycles"; typ = nat; src = empty_src } |
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.
move to type.ml
still problem with `nullE`
Co-authored-by: Claudio Russo <[email protected]>
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.
Skimmed and looks ok, but I'll leave the proper review for the merge.
Also, do we really want to reset the @cycles to zero in desugar.ml when the cycles field is absent. At least, do we want to this before we've actually removed ExperimentalCycles.add altogether?
Yes, I think we should not have a mixture of both approaches. Either have a parenthetical or |
Oh, ok, so the old mechanism still works on sends without parenthetical, right? Seems sensible. |
KISS: keep it simple, stupid
This refactors the lowering of parentheticals for sends to simply assign to backend variables. So we piggy-back on the imperative mechanism instead of running the parenthetical through all the IR and backend hoops.
Maybe later we have to remove this shortcut, but for now it should work.
Thanks to @crusso for suggesting!