From 0c00552bdf95a129622de1e379e5595bc4216e0e Mon Sep 17 00:00:00 2001 From: Alexander Bandukwala <7h3kk1d@gmail.com> Date: Tue, 14 Jan 2025 14:51:32 -0500 Subject: [PATCH] Make and/or right associative --- src/haz3lcore/lang/Precedence.re | 4 ++-- src/haz3lcore/pretty/ExpToSegment.re | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/haz3lcore/lang/Precedence.re b/src/haz3lcore/lang/Precedence.re index 3a5b54ec5b..1c76d241fa 100644 --- a/src/haz3lcore/lang/Precedence.re +++ b/src/haz3lcore/lang/Precedence.re @@ -70,10 +70,10 @@ let concat = 29 |> right_associative; let eqs = 30 |> left_associative; // _____ == x // _____ && true -let and_ = 31; +let and_ = 31 |> right_associative; // true && _____ // _____ || false -let or_ = 32; +let or_ = 32 |> right_associative; // false || _____ let if_ = 34; let fun_ = 35; diff --git a/src/haz3lcore/pretty/ExpToSegment.re b/src/haz3lcore/pretty/ExpToSegment.re index ba34c0d726..1dcadd7b46 100644 --- a/src/haz3lcore/pretty/ExpToSegment.re +++ b/src/haz3lcore/pretty/ExpToSegment.re @@ -888,7 +888,7 @@ let rec parenthesize = (~preserve_filters: bool, exp: Exp.t): Exp.t => { | TyAlias(tp, t, e) => TyAlias( tp, - t |> paren_typ_at(Precedence.min), + parenthesize_typ(t) |> paren_typ_at(Precedence.min), parenthesize(e) |> paren_assoc_at(Precedence.let_), ) |> rewrap