aboutsummaryrefslogtreecommitdiffhomepage
path: root/proofs/redexpr.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2016-11-01 20:53:32 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-02-14 17:21:51 +0100
commit8f6aab1f4d6d60842422abc5217daac806eb0897 (patch)
treec36f2f963064f51fe1652714f4d91677d555727b /proofs/redexpr.ml
parent5143129baac805d3a49ac3ee9f3344c7a447634f (diff)
Reductionops API using EConstr.
Diffstat (limited to 'proofs/redexpr.ml')
-rw-r--r--proofs/redexpr.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/proofs/redexpr.ml b/proofs/redexpr.ml
index a442a5e63..40a8077a7 100644
--- a/proofs/redexpr.ml
+++ b/proofs/redexpr.ml
@@ -24,10 +24,11 @@ open Misctypes
(* call by value normalisation function using the virtual machine *)
let cbv_vm env sigma c =
+ let c = EConstr.Unsafe.to_constr c in
let ctyp = Retyping.get_type_of env sigma c in
if Termops.occur_meta_or_existential sigma (EConstr.of_constr c) then
error "vm_compute does not support existential variables.";
- Vnorm.cbv_vm env c ctyp
+ Vnorm.cbv_vm env sigma c ctyp
let warn_native_compute_disabled =
CWarnings.create ~name:"native-compute-disabled" ~category:"native-compiler"
@@ -39,13 +40,15 @@ let cbv_native env sigma c =
(warn_native_compute_disabled ();
cbv_vm env sigma c)
else
+ let c = EConstr.Unsafe.to_constr c in
let ctyp = Retyping.get_type_of env sigma c in
Nativenorm.native_norm env sigma c ctyp
let whd_cbn flags env sigma t =
let (state,_) =
(whd_state_gen true true flags env sigma (t,Reductionops.Stack.empty))
- in Reductionops.Stack.zip ~refold:true state
+ in
+ EConstr.Unsafe.to_constr (Reductionops.Stack.zip ~refold:true sigma state)
let strong_cbn flags =
strong (whd_cbn flags)