diff options
| author | Pierre-Marie Pédrot | 2020-03-17 16:28:46 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-03-17 16:28:46 +0100 |
| commit | b08ac5ac52f6ed361a3153b4efd4705bc4a172bc (patch) | |
| tree | 626e9bd236d6a389e6af2a319fc97fa790576f82 /kernel | |
| parent | 79650aa363b75d7a801bd1592177d7a59bb0c46b (diff) | |
| parent | 022e97191544c722b7bf04643713d254e13472c7 (diff) | |
Merge PR #11699: Comment difference between the 2 hashes on constr
Reviewed-by: ppedrot
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/constr.ml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/constr.ml b/kernel/constr.ml index 84eacb196c..fde08743b6 100644 --- a/kernel/constr.ml +++ b/kernel/constr.ml @@ -1297,7 +1297,8 @@ let hashcons (sh_sort,sh_ci,sh_construct,sh_ind,sh_con,sh_na,sh_id) = fun t -> fst (sh_rec t) (* Exported hashing fonction on constr, used mainly in plugins. - Appears to have slight differences from [snd (hash_term t)] above ? *) + Slight differences from [snd (hash_term t)] above: it ignores binders + and doesn't do [land 0x3FFFFFFF]. *) let rec hash t = match kind t with @@ -1336,7 +1337,7 @@ let rec hash t = | Float f -> combinesmall 19 (Float64.hash f) and hash_term_array t = - Array.fold_left (fun acc t -> combine (hash t) acc) 0 t + Array.fold_left (fun acc t -> combine acc (hash t)) 0 t module CaseinfoHash = struct |
