Skip to content

Commit 4d9254a

Browse files
Cameron-Lowstrub
authored andcommitted
Use reductive equality tests, and destruct the last matching operator
1 parent feb688f commit 4d9254a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/phl/ecPhlEager.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ let destruct_on_op id_op tc =
9696
let env = FApi.tc1_env tc and es = tc1_as_equivS tc in
9797
let s =
9898
try
99-
let s, _ = split_at_cpos1 env (-1, `ByMatch (None, id_op)) es.es_sl
99+
let s, _ = split_at_cpos1 env (-1, `ByMatch (Some (-1), id_op)) es.es_sl
100100
(* ensure the right statement also contains an [id_op]: *)
101101
and _, _ = split_at_cpos1 env (1, `ByMatch (None, id_op)) es.es_sr in
102102
s
@@ -237,7 +237,7 @@ let t_eager_while_r i tc =
237237
subst_expr (add_memory empty mr ml)
238238
in
239239

240-
if (not (e_equal e (sub_to_left_mem _e))) then
240+
if (not (ER.EqTest.for_expr env e (sub_to_left_mem _e))) then
241241
tc_error !!tc "eager: both while guards must be syntactically equal";
242242

243243
let eqMem1 = eq_on_form_and_stmt env i c' and eqI = eq_on_sided_form env i in
@@ -317,7 +317,7 @@ let t_eager_fun_def_r tc =
317317
let t_eager_fun_abs_r i tc =
318318
let env, _, _ = FApi.tc1_eflat tc and eg = tc1_as_eagerF tc in
319319

320-
if not (s_equal eg.eg_sl eg.eg_sr) then
320+
if not (ER.EqTest.for_stmt env eg.eg_sl eg.eg_sr) then
321321
tc_error !!tc "eager: both swapping statements must be identical";
322322

323323
if not (ensure_eq_shape tc i.ml i.mr i.inv) then

0 commit comments

Comments
 (0)