Commit 712dcd37 authored by Andrei Paskevich's avatar Andrei Paskevich

Eval_match: preserve quantifiers after passing to terms

eval_match should not destruct user-written quantifiers.
For this purpose it preserves all quantifiers inside annotations.
For the same purpose it now also preserves all quantifiers appearing
inside terms in let-bindings (in particular, inside lambdas).
parent f9ff4e02
......@@ -135,7 +135,8 @@ let flat_case t bl =
Pattern.compile_bare ~mk_case ~mk_let [t] (List.map mk_b bl)
let rec eval_match kn stop env t =
let stop = stop || Slab.mem Ity.annot_label t.t_label in
let stop = stop || t.t_ty <> None ||
Slab.mem Ity.annot_label t.t_label in
let eval env t = eval_match kn stop env t in
t_label_copy t (match t.t_node with
| Tapp (ls, [t1;t2]) when ls_equal ls ps_equ ->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment