Skip to content

Commit 87333d7

Browse files
committed
Add since-annotations
1 parent 54c9de5 commit 87333d7

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Data/HashMap/Internal.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,8 @@ infixl 9 !
790790
-- if present, otherwise return 'Nothing'.
791791
--
792792
-- This function can be used for /interning/, i.e. to reduce memory usage.
793+
--
794+
-- @since 0.2.21
793795
lookupKey :: Hashable k => k -> HashMap k v -> Maybe k
794796
lookupKey k = \m -> fromMaybe# (lookupKeyInSubtree# 0 (hash k) k m)
795797
where
@@ -1972,6 +1974,8 @@ differenceWith f = differenceWithKey (const f)
19721974
-- encountered, the combining function is applied to the values of these keys.
19731975
-- If it returns 'Nothing', the element is discarded (proper set difference). If
19741976
-- it returns (@'Just' y@), the element is updated with a new value @y@.
1977+
--
1978+
-- @since 0.2.21
19751979
differenceWithKey :: Eq k => (k -> v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v
19761980
differenceWithKey f = go_differenceWithKey 0
19771981
where
@@ -2323,7 +2327,7 @@ searchSwap mary n toFind start = go start toFind start
23232327
-- xs ``disjoint`` ys = null (xs ``intersection`` ys)
23242328
-- @
23252329
--
2326-
-- @since FIXME
2330+
-- @since 0.2.21
23272331
disjoint :: Eq k => HashMap k a -> HashMap k b -> Bool
23282332
disjoint = disjointSubtrees 0
23292333
{-# INLINE disjoint #-}

Data/HashMap/Internal/Strict.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,8 @@ differenceWith f = HM.differenceWithKey $
632632
-- encountered, the combining function is applied to the values of these keys.
633633
-- If it returns 'Nothing', the element is discarded (proper set difference). If
634634
-- it returns (@'Just' y@), the element is updated with a new value @y@.
635+
--
636+
-- @since 0.2.21
635637
differenceWithKey :: Eq k => (k -> v -> w -> Maybe v) -> HashMap k v -> HashMap k w -> HashMap k v
636638
differenceWithKey f = HM.differenceWithKey $
637639
\k vA vB -> case f k vA vB of

Data/HashSet/Internal.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ member a s = case H.lookup a (asMap s) of
356356
-- present, otherwise return 'Nothing'.
357357
--
358358
-- This is useful for /interning/, i.e. to reduce memory usage.
359+
--
360+
-- @since 0.2.21
359361
lookupElement :: Hashable a => a -> HashSet a -> Maybe a
360362
lookupElement a = H.lookupKey a . asMap
361363
{-# INLINE lookupElement #-}
@@ -412,7 +414,7 @@ intersection (HashSet a) (HashSet b) = HashSet (H.intersection a b)
412414
-- xs ``disjoint`` ys = null (xs ``intersection`` ys)
413415
-- @
414416
--
415-
-- @since FIXME
417+
-- @since 0.2.21
416418
disjoint :: Eq k => HashSet k -> HashSet k -> Bool
417419
disjoint (HashSet a) (HashSet b) = H.disjoint a b
418420
{-# INLINE disjoint #-}

0 commit comments

Comments
 (0)