aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/omega
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-10-24 09:41:19 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-10-24 09:41:19 +0000
commita3a5711d8c2f9f0e12ed707c8b69c828e30bbcf4 (patch)
tree02972edf2946cbb9f4a30133d9f66dd5cdbe7987 /plugins/omega
parentbb5e6d7c39211349d460db0b61b2caf3d099d5b6 (diff)
Turn many List.assoc into List.assoc_f
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16925 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/omega')
-rw-r--r--plugins/omega/coq_omega.ml12
-rw-r--r--plugins/omega/omega.ml2
2 files changed, 9 insertions, 5 deletions
diff --git a/plugins/omega/coq_omega.ml b/plugins/omega/coq_omega.ml
index c39b2ff0a..5c057231a 100644
--- a/plugins/omega/coq_omega.ml
+++ b/plugins/omega/coq_omega.ml
@@ -131,20 +131,24 @@ let unfold s = Tactics.unfold_in_concl [Locus.AllOccurrences, Lazy.force s]
let rev_assoc k =
let rec loop = function
- | [] -> raise Not_found | (v,k')::_ when Int.equal k k' -> v | _ :: l -> loop l
+ | [] -> raise Not_found
+ | (v,k')::_ when Int.equal k k' -> v
+ | _ :: l -> loop l
in
loop
let tag_hypothesis,tag_of_hyp, hyp_of_tag =
let l = ref ([]:(Id.t * int) list) in
(fun h id -> l := (h,id):: !l),
- (fun h -> try List.assoc h !l with Not_found -> failwith "tag_hypothesis"),
+ (fun h ->
+ try List.assoc_f Id.equal h !l with Not_found -> failwith "tag_hypothesis"),
(fun h -> try rev_assoc h !l with Not_found -> failwith "tag_hypothesis")
let hide_constr,find_constr,clear_tables,dump_tables =
let l = ref ([]:(constr * (Id.t * Id.t * bool)) list) in
(fun h id eg b -> l := (h,(id,eg,b)):: !l),
- (fun h -> try List.assoc_f eq_constr h !l with Not_found -> failwith "find_contr"),
+ (fun h ->
+ try List.assoc_f Constr.equal h !l with Not_found -> failwith "find_contr"),
(fun () -> l := []),
(fun () -> !l)
@@ -1018,7 +1022,7 @@ let replay_history tactic_normalisation =
begin
try
tclTHEN
- (List.assoc (hyp_of_tag e.id) tactic_normalisation)
+ (List.assoc_f Id.equal (hyp_of_tag e.id) tactic_normalisation)
(loop l)
with Not_found -> loop l end
| NEGATE_CONTRADICT (e2,e1,b) :: l ->
diff --git a/plugins/omega/omega.ml b/plugins/omega/omega.ml
index cf1a7e6db..b74faf30b 100644
--- a/plugins/omega/omega.ml
+++ b/plugins/omega/omega.ml
@@ -705,7 +705,7 @@ let simplify_strong ((new_eq_id,new_var_id,print_var) as new_ids) system =
let s2' = List.map remove_int s2 in
let (r1,relie1) = solve s1'
and (r2,relie2) = solve s2' in
- let (eq,id1,id2) = List.assoc id explode_map in
+ let (eq,id1,id2) = Util.List.assoc_f Int.equal id explode_map in
[SPLIT_INEQ(eq,(id1,r1),(id2, r2))],
eq.id :: Util.List.union Int.equal relie1 relie2
with FULL_SOLUTION (x0,x1) -> (x0,x1)