Skip to content

Commit

Permalink
Fix precedences of type +
Browse files Browse the repository at this point in the history
Negabinary committed Aug 21, 2024
1 parent 7b39c43 commit 5249dc3
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/haz3lcore/lang/Form.re
Original file line number Diff line number Diff line change
@@ -283,7 +283,7 @@ let forms: list((string, t)) = [
("typ_plus", mk_infix("+", Typ, P.type_plus)),
// UNARY PREFIX OPERATORS
("not", mk(ii, ["!"], mk_pre(P.not_, Exp, []))),
("typ_sum_single", mk(ss, ["+"], mk_pre(P.type_sum_ap, Typ, []))),
("typ_sum_single", mk(ss, ["+"], mk_pre(P.or_, Typ, []))),
("unary_minus", mk(ss, ["-"], mk_pre(P.neg, Exp, []))),
("unquote", mk(ss, ["$"], mk_pre(P.unquote, Exp, []))),
// N-ARY OPS (on the semantics level)
10 changes: 5 additions & 5 deletions src/haz3lcore/lang/Precedence.re
Original file line number Diff line number Diff line change
@@ -25,16 +25,16 @@ let right_associative = (level: t) => {
let max: t = 0;

// ========== TYPES ==========
let type_sum_ap = 10;
let type_sum_ap = 22;
// _____ (Int)
// + T1 + _____
let type_plus = 11;
let type_plus = 25;
// _____ -> Int
let type_arrow = 12 |> right_associative;
let type_arrow = 28 |> right_associative;
// Int -> _____
// String , _____ , String
let type_prod = 13;
let type_binder = 14;
let type_prod = 45;
let type_binder = 38;
// forall t -> _____
// rec t -> _____

0 comments on commit 5249dc3

Please sign in to comment.