diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2017-09-15 10:38:45 +0200 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2017-09-15 10:38:45 +0200 |
commit | d6d7a12eb49c997dd83298477e216349fad74c7f (patch) | |
tree | aa4648227f0b1a5c5e9c1b5e6e2f17818db73413 /pretyping/pretyping.ml | |
parent | d2406149554812a01ac615af43af6b7b2a3efd72 (diff) | |
parent | a1efd8080465eb49b30b5bab61cf3861899876e4 (diff) |
Merge PR #1048: Port is_Set and is_Type to EConstr, as was is_Prop already.
Diffstat (limited to 'pretyping/pretyping.ml')
-rw-r--r-- | pretyping/pretyping.ml | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/pretyping/pretyping.ml b/pretyping/pretyping.ml index 7cd35f530..ea1f2de53 100644 --- a/pretyping/pretyping.ml +++ b/pretyping/pretyping.ml @@ -1091,15 +1091,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 = @@ -1107,7 +1098,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 |