aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/evd.ml2
-rw-r--r--pretyping/recordops.ml2
-rw-r--r--pretyping/unification.ml6
3 files changed, 4 insertions, 6 deletions
diff --git a/pretyping/evd.ml b/pretyping/evd.ml
index dab4ee9c7..d696db3e7 100644
--- a/pretyping/evd.ml
+++ b/pretyping/evd.ml
@@ -568,7 +568,7 @@ let undefined_metas evd =
| (n,Cltyp (_,typ)) -> Some n
in
let m = List.map_filter filter (meta_list evd) in
- List.sort Pervasives.compare m
+ List.sort (-) m
let metas_of evd =
List.map (function
diff --git a/pretyping/recordops.ml b/pretyping/recordops.ml
index f32eb0879..fdc7875d7 100644
--- a/pretyping/recordops.ml
+++ b/pretyping/recordops.ml
@@ -114,6 +114,8 @@ module MethodsDnet : Term_dnet.S
= Term_dnet.Make
(struct
type t = global_reference * Evd.evar * Evd.evar_map
+ (** ppedrot: FIXME: this is surely wrong, generic equality has nothing to
+ do w.r.t. evar maps. *)
let compare = Pervasives.compare
let subst = subst_id
let constr_of (_,ev,evm) = Evd.evar_concl (Evd.find evm ev)
diff --git a/pretyping/unification.ml b/pretyping/unification.ml
index e25a880f8..447ee8e3b 100644
--- a/pretyping/unification.ml
+++ b/pretyping/unification.ml
@@ -103,13 +103,9 @@ let extract_instance_status = function
| CUMUL -> add_type_status (IsSubType, IsSuperType)
| CONV -> add_type_status (Conv, Conv)
-let rec assoc_pair x = function
- [] -> raise Not_found
- | (a,b,_)::l -> if compare a x = 0 then b else assoc_pair x l
-
let rec subst_meta_instances bl c =
match kind_of_term c with
- | Meta i -> (try assoc_pair i bl with Not_found -> c)
+ | Meta i -> (try List.assoc_snd_in_triple i bl with Not_found -> c)
| _ -> map_constr (subst_meta_instances bl) c
let pose_all_metas_as_evars env evd t =