We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56e3eed commit e7a2eadCopy full SHA for e7a2ead
Data/HashMap/Base.hs
@@ -203,6 +203,9 @@ instance Traversable (HashMap k) where
203
instance (Eq k, Eq v) => Eq (HashMap k v) where
204
(==) = equal
205
206
+instance (Hashable k, Hashable v) => Hashable (HashMap k v) where
207
+ hashWithSalt = foldlWithKey' (\h k v -> h `H.hashWithSalt` k `H.hashWithSalt` v)
208
+
209
equal :: (Eq k, Eq v) => HashMap k v -> HashMap k v -> Bool
210
equal t1 t2 = go (toList' t1 []) (toList' t2 [])
211
where
0 commit comments