aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-21 14:49:16 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-08-01 16:11:55 +0200
commitcabce8ae233040c2365bfd8bd1f478676fcade33 (patch)
tree92bd7153a50e16ed98ceda7a70489df7f8a97ba3 /interp
parent65bd1deac80689d02be7ef580872974cc38bf93c (diff)
Detyping functions are now operating on EConstr.t.
This was already the case, but the API was not exposing this.
Diffstat (limited to 'interp')
-rw-r--r--interp/constrextern.ml4
-rw-r--r--interp/constrextern.mli3
2 files changed, 2 insertions, 5 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml
index fcaee5c93..54861ae4c 100644
--- a/interp/constrextern.ml
+++ b/interp/constrextern.ml
@@ -1098,7 +1098,6 @@ let extern_constr_gen lax goal_concl_style scopt env sigma t =
(* Not "goal_concl_style" means do alpha-conversion avoiding only *)
(* those goal/section/rel variables that occurs in the subterm under *)
(* consideration; see namegen.ml for further details *)
- let t = EConstr.of_constr t in
let avoid = if goal_concl_style then ids_of_context env else [] in
let r = Detyping.detype ~lax:lax goal_concl_style avoid env sigma t in
let vars = vars_of_env env in
@@ -1111,7 +1110,6 @@ let extern_constr ?(lax=false) goal_concl_style env sigma t =
extern_constr_gen lax goal_concl_style None env sigma t
let extern_type goal_concl_style env sigma t =
- let t = EConstr.of_constr t in
let avoid = if goal_concl_style then ids_of_context env else [] in
let r = Detyping.detype goal_concl_style avoid env sigma t in
extern_glob_type (vars_of_env env) r
@@ -1198,8 +1196,6 @@ let extern_constr_pattern env sigma pat =
extern true (None,[]) Id.Set.empty (glob_of_pat env sigma pat)
let extern_rel_context where env sigma sign =
- let sign = List.map (fun d -> Termops.map_rel_decl EConstr.of_constr d) sign in
- let where = Option.map EConstr.of_constr where in
let a = detype_rel_context where [] (names_of_rel_context env,env) sigma sign in
let vars = vars_of_env env in
let a = List.map (extended_glob_local_binder_of_decl) a in
diff --git a/interp/constrextern.mli b/interp/constrextern.mli
index b5242b347..ffa891c50 100644
--- a/interp/constrextern.mli
+++ b/interp/constrextern.mli
@@ -9,6 +9,7 @@
open Names
open Term
open Termops
+open EConstr
open Environ
open Libnames
open Globnames
@@ -41,7 +42,7 @@ val extern_reference : ?loc:Loc.t -> Id.Set.t -> global_reference -> reference
val extern_type : bool -> env -> Evd.evar_map -> types -> constr_expr
val extern_sort : Evd.evar_map -> sorts -> glob_sort
val extern_rel_context : constr option -> env -> Evd.evar_map ->
- Context.Rel.t -> local_binder_expr list
+ rel_context -> local_binder_expr list
(** Printing options *)
val print_implicits : bool ref