blob: 6d8d3b7ee8de7a42baaccb9c2e08f34ccf7ace50 [file]
import Lean.Data.PersistentHashMap
open Lean
def m : PersistentHashMap Nat Nat :=
let m : PersistentHashMap Nat Nat := {};
m.insert 1 1
@[instance_reducible]
def natDiffHash : Hashable Nat :=
⟨fun n => UInt64.ofNat $ n+10⟩
-- The following example should fail since the `Hashable` instance used to create `m` is not `natDiffHash`
#eval @PersistentHashMap.find? Nat Nat _ natDiffHash m 1