Skip to content

Commit 6f7002f

Browse files
committed
Fix IH not appearing with pattern cast mismatch
1 parent e5bfb65 commit 6f7002f

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/language/proof/MatchExp.re

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ and match_pat = (pat_r: Pat.t, pat: Pat.t): option(alphas) =>
265265
| (Projector(_, p1), _) => match_pat(p1, pat)
266266
| (_, Parens(p2))
267267
| (_, Projector(_, p2)) => match_pat(pat_r, p2)
268+
| (Asc(p1, _), _) => match_pat(p1, pat)
269+
| (_, Asc(p2, _)) => match_pat(pat_r, p2)
268270
| (Invalid(x), Invalid(y)) when x == y => Some([])
269271
| (Invalid(_), _) => None
270272
| (EmptyHole, EmptyHole) => Some([])
@@ -319,11 +321,6 @@ and match_pat = (pat_r: Pat.t, pat: Pat.t): option(alphas) =>
319321
let* alphas2 = match_pat(x2, y2);
320322
Some(alphas1 @ alphas2);
321323
| (Ap(_, _), _) => None
322-
| (Asc(x, t1), Asc(y, t2)) =>
323-
let* alphas1 = match_pat(x, y);
324-
let* () = match_typ(t1, t2);
325-
Some(alphas1);
326-
| (Asc(_, _), _) => None
327324
| (Label(l1), Label(l2)) when l1 == l2 => Some([])
328325
| (Label(_), _) => None
329326
| (TupLabel({term: ExplicitNonlabel, _}, pat_r), _) =>

src/util/StringUtil.re

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,5 @@ let subseq_search = (s: string, sub: string): bool => {
180180
);
181181
};
182182

183-
print_endline(
184-
"Subseq search: "
185-
++ sub
186-
++ " in "
187-
++ s
188-
++ "returns"
189-
++ string_of_bool(search(0, 0)),
190-
);
191-
192183
search(0, 0);
193184
};

0 commit comments

Comments
 (0)