-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3378 from FStarLang/gebner_parens
Do not require parentheses for fun/assume/assert
- Loading branch information
Showing
3 changed files
with
99 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
ocaml/fstar-lib/generated/FStar_InteractiveHelpers_Effectful.ml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module Parentheses | ||
|
||
let forall_intro #t (#p: t->Type0) (h: (x:t -> squash (p x))) : squash (forall x. p x) = | ||
Classical.Sugar.forall_intro _ _ h | ||
|
||
let trailing_fun_does_not_require_parens : | ||
squash (forall (x: nat) (y: nat). x + y >= 0) = | ||
forall_intro fun x -> forall_intro fun y -> () | ||
|
||
let trailing_fun_swallows_seqs : | ||
squash (forall (x: nat) (y: nat). x + y >= 0) = | ||
forall_intro fun x -> forall_intro fun y -> (); () | ||
|
||
let assert_does_not_require_parens : unit = | ||
assert 8 < 42; | ||
() | ||
|
||
let assume_does_not_require_parens : False = | ||
assume 0 == 1; | ||
() | ||
|
||
let forall_does_not_require_parens () : Lemma (True /\ forall x. x <= x) = | ||
() | ||
|
||
let exists_does_not_require_parens () : Lemma (True /\ exists x. x <= x) = | ||
() |