diff options
author | puech <puech@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2011-11-28 17:00:49 +0000 |
---|---|---|
committer | puech <puech@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2011-11-28 17:00:49 +0000 |
commit | 45141987acc8069448a4fe4e0c22af81d3f7f669 (patch) | |
tree | c06b4b01c8f79969fafb6aec16209fb65c6f3e17 /kernel | |
parent | 4f523e7d25ed22b6e41cabf1c2bd091afc0fde7f (diff) |
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
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/term.ml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/term.ml b/kernel/term.ml index 513573b8a..d29f467a2 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) -> |