-
Notifications
You must be signed in to change notification settings - Fork 236
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
Do not require parentheses for fun/assume/assert #3378
Conversation
And it finished successfully. |
dc9e2ec
to
fcc1b9c
Compare
Hi Gabriel, this looks great, but I'm concerned about the following warnings:
In master this is:
Would be good if we can rework the grammar a bit to remove the conflicts, but in general I really like this feature (we discussed it today too and agreed it's good) Also, would be nice if we can ditch the parenthesis in formulas like |
There are also unnecessary parenthesis in expressions like |
I managed to fix the reduce/reduce conflicts:
However, there are a few new shift/reduce conflicts: these are of the form I haven't used parser generators in decades, so this is mostly guesswork and I'd love to hear from someone more experienced. AFAICT, there are two ways to disambiguate conflicts:
Unfortunately, I don't see how either one would help with this change. |
FWIW, I'm also getting these warnings:
Is it safe to remove those unused nonterminals? EDIT: I just saw that they are used in pulse. |
I also think that these parens are unnecessary, but I'm not sure what the best way to go here is. Would you expect the following to work? Seq.length let x = Seq.create 1 42 in Seq.append x x I tried moving let to tmNoEqWith instead, but that breaks quite a bit. |
I just did another everest run with the changes to forall/exists, and I can confirm that there are no regressions. |
Check world CI: https://github.com/FStarLang/FStar/actions/runs/10705049189 |
This PR changes the parser to require fewer parentheses:
foo fun x -> x + 1
assume
andassert
arguments:assert 1 < 2
(Like we already do in Pulse.)I'm doing an everest run right now.