Skip to content

Commit 2b0674e

Browse files
committed
Strict.differenceWith: Relax Hashable constraint
Fixes an oversight in #542.
1 parent 56c5a7c commit 2b0674e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/HashMap/Internal/Strict.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ traverseWithKey f = go
620620
-- encountered, the combining function is applied to the values of these keys.
621621
-- If it returns 'Nothing', the element is discarded (proper set difference). If
622622
-- it returns (@'Just' y@), the element is updated with a new value @y@.
623-
differenceWith :: Hashable k => (v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v
623+
differenceWith :: Eq k => (v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v
624624
differenceWith f = HM.differenceWithKey $
625625
\_k vA vB -> case f vA vB of
626626
Nothing -> Nothing

0 commit comments

Comments
 (0)