aboutsummaryrefslogtreecommitdiff
path: root/pretyping
diff options
context:
space:
mode:
authorGaëtan Gilbert2020-02-07 15:21:32 +0100
committerGaëtan Gilbert2020-02-07 15:21:32 +0100
commitaaea20533a92787a4b445fca01d0d90a2b59cce1 (patch)
treea5987b56a9488413f66d7fd38cb5902ea0b0f11f /pretyping
parent51c0b1414be9a46e221b13f652474db0194093fc (diff)
various unsafe_type_of -> type_of_variable in funind
This is the easy part of removing unsafe_type_of, as type_of_variable doesn't return (or even take as argument) an evar map.
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/typing.ml3
-rw-r--r--pretyping/typing.mli3
2 files changed, 6 insertions, 0 deletions
diff --git a/pretyping/typing.ml b/pretyping/typing.ml
index a15134f58d..4582844b71 100644
--- a/pretyping/typing.ml
+++ b/pretyping/typing.ml
@@ -253,6 +253,9 @@ let judge_of_type u =
let judge_of_relative env v =
Environ.on_judgment EConstr.of_constr (judge_of_relative env v)
+let type_of_variable env id =
+ EConstr.of_constr (type_of_variable env id)
+
let judge_of_variable env id =
Environ.on_judgment EConstr.of_constr (judge_of_variable env id)
diff --git a/pretyping/typing.mli b/pretyping/typing.mli
index 1b07b2bb78..fd2dc7c2fc 100644
--- a/pretyping/typing.mli
+++ b/pretyping/typing.mli
@@ -30,6 +30,9 @@ val sort_of : env -> evar_map -> types -> evar_map * Sorts.t
(** Typecheck a term has a given type (assuming the type is OK) *)
val check : env -> evar_map -> constr -> types -> evar_map
+(** Type of a variable. *)
+val type_of_variable : env -> variable -> types
+
(** Returns the instantiated type of a metavariable *)
val meta_type : evar_map -> metavariable -> types