diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2016-11-06 21:59:18 +0100 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-02-14 17:26:38 +0100 |
commit | b77579ac873975a15978c5a4ecf312d577746d26 (patch) | |
tree | 772e41667e74c38582ff6f4645c73e7d7556f935 /proofs/redexpr.ml | |
parent | 258c8502eafd3e078a5c7478a452432b5c046f71 (diff) |
Tacred API using EConstr.
Diffstat (limited to 'proofs/redexpr.ml')
-rw-r--r-- | proofs/redexpr.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/proofs/redexpr.ml b/proofs/redexpr.ml index 19e72e697..d4a58da32 100644 --- a/proofs/redexpr.ml +++ b/proofs/redexpr.ml @@ -200,6 +200,9 @@ let out_arg = function let out_with_occurrences (occs,c) = (Locusops.occurrences_map (List.map out_arg) occs, c) +let out_with_occurrences' (occs,c) = + (Locusops.occurrences_map (List.map out_arg) occs, EConstr.of_constr c) + let e_red f = { e_redfun = fun env evm c -> Sigma.here (f env (Sigma.to_evar_map evm) c) evm } let head_style = false (* Turn to true to have a semantics where simpl @@ -239,8 +242,8 @@ let reduction_of_red_expr env = (e_red (strong_cbn (make_flag f)), DEFAULTcast) | Lazy f -> (e_red (clos_norm_flags (make_flag f)),DEFAULTcast) | Unfold ubinds -> (e_red (unfoldn (List.map out_with_occurrences ubinds)),DEFAULTcast) - | Fold cl -> (e_red (fold_commands cl),DEFAULTcast) - | Pattern lp -> (pattern_occs (List.map out_with_occurrences lp),DEFAULTcast) + | Fold cl -> (e_red (fold_commands (List.map EConstr.of_constr cl)),DEFAULTcast) + | Pattern lp -> (pattern_occs (List.map out_with_occurrences' lp),DEFAULTcast) | ExtraRedExpr s -> (try (e_red (String.Map.find s !reduction_tab),DEFAULTcast) with Not_found -> |