diff options
| author | Gaëtan Gilbert | 2020-02-27 14:50:51 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2020-03-11 13:35:07 +0100 |
| commit | 022e97191544c722b7bf04643713d254e13472c7 (patch) | |
| tree | b6e3d7c670222f5f17774fdf0ad85b6ac8c20c55 /kernel | |
| parent | 45e83041ee129a541fdf17a8c50dd6e9e0e81262 (diff) | |
Comment difference between the 2 hashes on constr
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 |
