aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
authorGravatar puech <puech@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-07-29 14:25:22 +0000
committerGravatar puech <puech@85f007b7-540e-0410-9357-904b9bb8a0f7>2011-07-29 14:25:22 +0000
commit127c54da8e8eedd12c7584d4950ef37d26d6428c (patch)
tree667c34b53338c800b647d69259bdcc687c43f625 /pretyping
parent6170732204b21f982cc6e0ef3e0931add3576d6b (diff)
Classops: generic equality on constr replaced by eq_constr
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14325 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/classops.ml9
1 files changed, 8 insertions, 1 deletions
diff --git a/pretyping/classops.ml b/pretyping/classops.ml
index 42925a4c2..f6eaaa665 100644
--- a/pretyping/classops.ml
+++ b/pretyping/classops.ml
@@ -46,6 +46,13 @@ type coe_info_typ = {
coe_is_identity : bool;
coe_param : int }
+let coe_info_typ_equal c1 c2 =
+ eq_constr c1.coe_value c2.coe_value &&
+ eq_constr c1.coe_type c2.coe_type &&
+ c1.coe_strength = c2.coe_strength &&
+ c1.coe_is_identity = c2.coe_is_identity &&
+ c1.coe_param = c2.coe_param
+
type cl_index = int
type coe_index = coe_info_typ
@@ -306,7 +313,7 @@ let add_coercion_in_graph (ic,source,target) =
try_add_new_path1 (s,target) (p@[ic]);
Gmap.iter
(fun (u,v) q ->
- if u<>v & (u = target) & (p <> q) then
+ if u<>v & u = target && not (list_equal coe_info_typ_equal p q) then
try_add_new_path1 (s,v) (p@[ic]@q))
old_inheritance_graph
end;