Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Data/HashMap/Internal/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ traverseWithKey f = go
-- encountered, the combining function is applied to the values of these keys.
-- If it returns 'Nothing', the element is discarded (proper set difference). If
-- it returns (@'Just' y@), the element is updated with a new value @y@.
differenceWith :: Hashable k => (v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v
differenceWith :: Eq k => (v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v
differenceWith f = HM.differenceWithKey $
\_k vA vB -> case f vA vB of
Nothing -> Nothing
Expand Down
2 changes: 1 addition & 1 deletion Data/HashSet/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ map f = fromList . List.map f . toList
--
-- >>> HashSet.difference (HashSet.fromList [1,2,3]) (HashSet.fromList [2,3,4])
-- fromList [1]
difference :: Hashable a => HashSet a -> HashSet a -> HashSet a
difference :: Eq a => HashSet a -> HashSet a -> HashSet a
difference (HashSet a) (HashSet b) = HashSet (H.difference a b)
{-# INLINABLE difference #-}

Expand Down
Loading