diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-10-24 21:25:12 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2013-10-24 21:25:12 +0000 |
commit | 43050b0d802f74fe59347f61830467a9804fd0d3 (patch) | |
tree | 563601b09463b12a4c478a4430f1e05dcccc6db1 /checker/declarations.ml | |
parent | 9e37e3b9695a214040c52082b1e7288df9362b33 (diff) |
Rtree : cleanup of the comparing code
* Using generic fold functions was unecessarily obscure
* No more List.mem and hence indirect use of ocaml generic comparison
* Rtree.equiv (former Rtree.compare_rtree) has now a less cryptic
semantic...
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16934 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'checker/declarations.ml')
-rw-r--r-- | checker/declarations.ml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/checker/declarations.ml b/checker/declarations.ml index dfa7d401e..97958c2b7 100644 --- a/checker/declarations.ml +++ b/checker/declarations.ml @@ -469,6 +469,14 @@ let dest_subterms p = let subst_wf_paths sub p = Rtree.smartmap (subst_recarg sub) p +let eq_recarg r1 r2 = match r1, r2 with + | Norec, Norec -> true + | Mrec i1, Mrec i2 -> Names.eq_ind i1 i2 + | Imbr i1, Imbr i2 -> Names.eq_ind i1 i2 + | _ -> false + +let eq_wf_paths = Rtree.equal eq_recarg + (**********************************************************************) (* Representation of mutual inductive types in the kernel *) (* |