lean4-htt/tests/lean/phashmap_inst_coherence.lean
Leonardo de Moura a1aac9a98d chore: fix tests
2019-12-15 18:34:13 -08:00

11 lines
361 B
Text

import Init.Data.PersistentHashMap
def m : PersistentHashMap Nat Nat :=
let m : PersistentHashMap Nat Nat := {};
m.insert 1 1
def natDiffHash : Hashable Nat :=
⟨fun n => USize.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