diff options
author | 2012-10-29 13:02:23 +0000 | |
---|---|---|
committer | 2012-10-29 13:02:23 +0000 | |
commit | 278517722988d040cb8da822e319d723670ac519 (patch) | |
tree | 92316184aec004570c6567f0d585167e47dd52ae /pretyping | |
parent | 0699ef2ffba984e7b7552787894b142dd924f66a (diff) |
Removed many calls to OCaml generic equality. This was done by
writing our own comparison functions, and enforcing monomorphization
in many places. This should be more efficient, btw. Still a work
in progress.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15932 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
-rw-r--r-- | pretyping/evd.ml | 2 | ||||
-rw-r--r-- | pretyping/recordops.ml | 2 | ||||
-rw-r--r-- | pretyping/unification.ml | 6 |
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 = |