aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--pretyping/nativenorm.ml6
-rw-r--r--pretyping/nativenorm.mli5
-rw-r--r--pretyping/pretyping.ml2
-rw-r--r--proofs/redexpr.ml5
4 files changed, 11 insertions, 7 deletions
diff --git a/pretyping/nativenorm.ml b/pretyping/nativenorm.ml
index e45c920a3..c8bcae0c8 100644
--- a/pretyping/nativenorm.ml
+++ b/pretyping/nativenorm.ml
@@ -377,7 +377,9 @@ let evars_of_evar_map sigma =
Nativelambda.evars_typ = Evd.existential_type sigma;
Nativelambda.evars_metas = Evd.meta_type sigma }
-let native_norm env sigma c ty =
+let native_norm env sigma c ty =
+ let c = EConstr.Unsafe.to_constr c in
+ let ty = EConstr.Unsafe.to_constr ty in
if Coq_config.no_native_compiler then
error "Native_compute reduction has been disabled at configure time."
else
@@ -407,5 +409,7 @@ let native_conv_generic pb sigma t =
Nativeconv.native_conv_gen pb (evars_of_evar_map sigma) t
let native_infer_conv ?(pb=Reduction.CUMUL) env sigma t1 t2 =
+ let t1 = EConstr.Unsafe.to_constr t1 in
+ let t2 = EConstr.Unsafe.to_constr t2 in
Reductionops.infer_conv_gen (fun pb ~l2r sigma ts -> native_conv_generic pb sigma)
~catch_incon:true ~pb env sigma t1 t2
diff --git a/pretyping/nativenorm.mli b/pretyping/nativenorm.mli
index 0b1ce8e51..ba46138a4 100644
--- a/pretyping/nativenorm.mli
+++ b/pretyping/nativenorm.mli
@@ -5,13 +5,14 @@
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
-open Term
+
+open EConstr
open Environ
open Evd
(** This module implements normalization by evaluation to OCaml code *)
-val native_norm : env -> evar_map -> constr -> types -> constr
+val native_norm : env -> evar_map -> constr -> types -> Constr.t
(** Conversion with inference of universe constraints *)
val native_infer_conv : ?pb:conv_pb -> env -> evar_map -> constr -> constr ->
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml
index 3a6d4f36c..2f42ad395 100644
--- a/pretyping/pretyping.ml
+++ b/pretyping/pretyping.ml
@@ -1021,7 +1021,7 @@ let rec pretype k0 resolve_tc (tycon : type_constraint) (env : ExtraEnv.t) evdre
let cj = pretype empty_tycon env evdref lvar c in
let cty = nf_evar !evdref cj.uj_type and tval = nf_evar !evdref tval in
begin
- let (evd,b) = Nativenorm.native_infer_conv env.ExtraEnv.env !evdref cty tval in
+ let (evd,b) = Nativenorm.native_infer_conv env.ExtraEnv.env !evdref (EConstr.of_constr cty) (EConstr.of_constr tval) in
if b then (evdref := evd; cj, tval)
else
error_actual_type ~loc env.ExtraEnv.env !evdref cj tval
diff --git a/proofs/redexpr.ml b/proofs/redexpr.ml
index 348cd1bcb..62fe2c17c 100644
--- a/proofs/redexpr.ml
+++ b/proofs/redexpr.ml
@@ -37,9 +37,8 @@ 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 ctyp = Retyping.get_type_of env sigma (EConstr.Unsafe.to_constr c) in
+ Nativenorm.native_norm env sigma c (EConstr.of_constr ctyp)
let whd_cbn flags env sigma t =
let (state,_) =