From 43050b0d802f74fe59347f61830467a9804fd0d3 Mon Sep 17 00:00:00 2001 From: letouzey Date: Thu, 24 Oct 2013 21:25:12 +0000 Subject: 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 --- checker/declarations.ml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'checker/declarations.ml') 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 *) (* -- cgit v1.2.3