You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make bind & tighter than mod in jkind parsing (#3076)
* make `&` tighter than `mod` in jkind parsing
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* forbid `k mod m & l` without parens around `mod`
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* reflect new syntax in tests
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* revert 1eea0c2
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* add typing test to demo `&` and `mod` precedence
Note that
```
type t3 : any & (any mod non_null) = #(t1 * t2);;
```
Does not have the same behavior as
```
type t3 : any & any mod non_null = #(t1 * t2);;
```
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* add test to [pprintast_unconditional.ml]
the test currently fails, so yes, we need to update the kind printer
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* add more parentheses in printer
there are sometimes unnecessary parentheses, but that seems fine in
the name of both clarity of printed syntax and printer simplicity
added a test with [with] along the way
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* fix oprint
and change the jkind bits of pprint ast to use [Misc.pp_parens_if] now
that it's exposed
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
---------
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
0 commit comments