aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping/pretyping.ml
diff options
context:
space:
mode:
Diffstat (limited to 'pretyping/pretyping.ml')
-rw-r--r--pretyping/pretyping.ml11
1 files changed, 1 insertions, 10 deletions
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml
index 79d2c3333..0afa694c3 100644
--- a/pretyping/pretyping.ml
+++ b/pretyping/pretyping.ml
@@ -1103,15 +1103,6 @@ and pretype_instance k0 resolve_tc env evdref lvar loc hyps evk update =
and pretype_type k0 resolve_tc valcon (env : ExtraEnv.t) evdref lvar c = match DAst.get c with
| GHole (knd, naming, None) ->
let loc = loc_of_glob_constr c in
- let rec is_Type c = match EConstr.kind !evdref c with
- | Sort s ->
- begin match ESorts.kind !evdref s with
- | Type _ -> true
- | Prop _ -> false
- end
- | Cast (c, _, _) -> is_Type c
- | _ -> false
- in
(match valcon with
| Some v ->
let s =
@@ -1119,7 +1110,7 @@ and pretype_type k0 resolve_tc valcon (env : ExtraEnv.t) evdref lvar c = match D
let t = Retyping.get_type_of env.ExtraEnv.env sigma v in
match EConstr.kind sigma (whd_all env.ExtraEnv.env sigma t) with
| Sort s -> ESorts.kind sigma s
- | Evar ev when is_Type (existential_type sigma ev) ->
+ | Evar ev when is_Type sigma (existential_type sigma ev) ->
evd_comb1 (define_evar_as_sort env.ExtraEnv.env) evdref ev
| _ -> anomaly (Pp.str "Found a type constraint which is not a type.")
in