Skip to content

Commit 3b354dc

Browse files
committed
Add annotations in Data.Containers.ListUtils
Fixes #724.
1 parent c2053eb commit 3b354dc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

containers/src/Data/Containers/ListUtils.hs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
-- In the documentation, \(n\) is the number of elements in the list while
1818
-- \(d\) is the number of distinct elements in the list. \(W\) is the number
1919
-- of bits in an 'Int'.
20+
--
21+
-- @since 0.6.0.1
2022
-----------------------------------------------------------------------------
2123

2224
module Data.Containers.ListUtils (
@@ -53,6 +55,8 @@ import GHC.Exts ( build )
5355
-- pathological cases. For example, to nub a list of characters, use
5456
--
5557
-- @ nubIntOn fromEnum xs @
58+
--
59+
-- @since 0.6.0.1
5660
nubOrd :: Ord a => [a] -> [a]
5761
nubOrd = nubOrdOn id
5862
{-# INLINE nubOrd #-}
@@ -65,6 +69,8 @@ nubOrd = nubOrdOn id
6569
--
6670
-- @nubOrdOn@ is strict in the values of the function applied to the
6771
-- elements of the list.
72+
--
73+
-- @since 0.6.0.1
6874
nubOrdOn :: Ord b => (a -> b) -> [a] -> [a]
6975
-- For some reason we need to write an explicit lambda here to allow this
7076
-- to inline when only applied to a function.
@@ -129,6 +135,8 @@ constNubOn x _ = x
129135
-- ==== Strictness
130136
--
131137
-- @nubInt@ is strict in the elements of the list.
138+
--
139+
-- @since 0.6.0.1
132140
nubInt :: [Int] -> [Int]
133141
nubInt = nubIntOn id
134142
{-# INLINE nubInt #-}
@@ -142,6 +150,8 @@ nubInt = nubIntOn id
142150
--
143151
-- @nubIntOn@ is strict in the values of the function applied to the
144152
-- elements of the list.
153+
--
154+
-- @since 0.6.0.1
145155
nubIntOn :: (a -> Int) -> [a] -> [a]
146156
-- For some reason we need to write an explicit lambda here to allow this
147157
-- to inline when only applied to a function.

0 commit comments

Comments
 (0)