From 45141987acc8069448a4fe4e0c22af81d3f7f669 Mon Sep 17 00:00:00 2001 From: puech Date: Mon, 28 Nov 2011 17:00:49 +0000 Subject: Term: Fix hash_constr behavior for Cast lnterleaved in application spines. hash_constr should give the same hash to two terms differing only by the presence of Casts. It should now make the same quotients on terms than constr_ord or equals_constr. This handles the case of App(Cast(App(f, l1), _, a), l2). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14735 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/term.ml | 1 + 1 file changed, 1 insertion(+) (limited to 'kernel') diff --git a/kernel/term.ml b/kernel/term.ml index 513573b8a2..d29f467a28 100644 --- a/kernel/term.ml +++ b/kernel/term.ml @@ -1359,6 +1359,7 @@ let rec hash_constr t = | Lambda (_, t, c) -> combinesmall 5 (combine (hash_constr t) (hash_constr c)) | LetIn (_, b, t, c) -> combinesmall 6 (combine3 (hash_constr b) (hash_constr t) (hash_constr c)) + | App (c,l) when isCast c -> hash_constr (mkApp (pi1 (destCast c),l)) | App (c,l) -> combinesmall 7 (combine (hash_term_array l) (hash_constr c)) | Evar (e,l) -> -- cgit v1.2.3