Skip to content

Commit 9c0d5a5

Browse files
committed
Add since pramgmas to haddock for functions and types that are new in 0.13.0.0
1 parent 16f9531 commit 9c0d5a5

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

vector/src/Data/Vector.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,6 +1716,8 @@ maximumBy = G.maximumBy
17161716
-- (2,'a')
17171717
-- >>> V.maximumOn fst $ V.fromList [(1,'a'), (1,'b')]
17181718
-- (1,'a')
1719+
--
1720+
-- @since 0.13.0.0
17191721
maximumOn :: Ord b => (a -> b) -> Vector a -> a
17201722
{-# INLINE maximumOn #-}
17211723
maximumOn = G.maximumOn
@@ -1764,6 +1766,8 @@ minimumBy = G.minimumBy
17641766
-- (1,'b')
17651767
-- >>> V.minimumOn fst $ V.fromList [(1,'a'), (1,'b')]
17661768
-- (1,'a')
1769+
--
1770+
-- @since 0.13.0.0
17671771
minimumOn :: Ord b => (a -> b) -> Vector a -> a
17681772
{-# INLINE minimumOn #-}
17691773
minimumOn = G.minimumOn

vector/src/Data/Vector/Generic.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,6 +1876,8 @@ maximumBy cmpr = Bundle.foldl1' maxBy . stream
18761876
-- (2,'a')
18771877
-- >>> V.maximumOn fst $ V.fromList [(1,'a'), (1,'b')]
18781878
-- (1,'a')
1879+
--
1880+
-- @since 0.13.0.0
18791881
maximumOn :: (Ord b, Vector v a) => (a -> b) -> v a -> a
18801882
{-# INLINE maximumOn #-}
18811883
maximumOn f = fst . Bundle.foldl1' maxBy . Bundle.map (\a -> (a, f a)) . stream
@@ -1934,6 +1936,8 @@ minimumBy cmpr = Bundle.foldl1' minBy . stream
19341936
-- (1,'b')
19351937
-- >>> V.minimumOn fst $ V.fromList [(1,'a'), (1,'b')]
19361938
-- (1,'a')
1939+
--
1940+
-- @since 0.13.0.0
19371941
minimumOn :: (Ord b, Vector v a) => (a -> b) -> v a -> a
19381942
{-# INLINE minimumOn #-}
19391943
minimumOn f = fst . Bundle.foldl1' minBy . Bundle.map (\a -> (a, f a)) . stream

vector/src/Data/Vector/Primitive.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,8 @@ maximumBy = G.maximumBy
14261426
-- | /O(n)/ Yield the maximum element of the vector by comparing the results
14271427
-- of a key function on each element. In case of a tie, the first occurrence
14281428
-- wins. The vector may not be empty.
1429+
--
1430+
-- @since 0.13.0.0
14291431
maximumOn :: (Ord b, Prim a) => (a -> b) -> Vector a -> a
14301432
{-# INLINE maximumOn #-}
14311433
maximumOn = G.maximumOn
@@ -1452,6 +1454,8 @@ minimumBy = G.minimumBy
14521454
-- | /O(n)/ Yield the minimum element of the vector by comparing the results
14531455
-- of a key function on each element. In case of a tie, the first occurrence
14541456
-- wins. The vector may not be empty.
1457+
--
1458+
-- @since 0.13.0.0
14551459
minimumOn :: (Ord b, Prim a) => (a -> b) -> Vector a -> a
14561460
{-# INLINE minimumOn #-}
14571461
minimumOn = G.minimumOn

vector/src/Data/Vector/Storable.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,8 @@ maximumBy = G.maximumBy
14731473
-- | /O(n)/ Yield the maximum element of the vector by comparing the results
14741474
-- of a key function on each element. In case of a tie, the first occurrence
14751475
-- wins. The vector may not be empty.
1476+
--
1477+
-- @since 0.13.0.0
14761478
maximumOn :: (Ord b, Storable a) => (a -> b) -> Vector a -> a
14771479
{-# INLINE maximumOn #-}
14781480
maximumOn = G.maximumOn
@@ -1499,6 +1501,8 @@ minimumBy = G.minimumBy
14991501
-- | /O(n)/ Yield the minimum element of the vector by comparing the results
15001502
-- of a key function on each element. In case of a tie, the first occurrence
15011503
-- wins. The vector may not be empty.
1504+
--
1505+
-- @since 0.13.0.0
15021506
minimumOn :: (Ord b, Storable a) => (a -> b) -> Vector a -> a
15031507
{-# INLINE minimumOn #-}
15041508
minimumOn = G.minimumOn

vector/src/Data/Vector/Unboxed.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,8 @@ maximumBy = G.maximumBy
14851485
-- (2,'a')
14861486
-- >>> VU.maximumOn fst $ VU.fromList [(1,'a'), (1 :: Int,'b')]
14871487
-- (1,'a')
1488+
--
1489+
-- @since 0.13.0.0
14881490
maximumOn :: (Ord b, Unbox a) => (a -> b) -> Vector a -> a
14891491
{-# INLINE maximumOn #-}
14901492
maximumOn = G.maximumOn
@@ -1535,6 +1537,8 @@ minimumBy = G.minimumBy
15351537
-- (1,'b')
15361538
-- >>> VU.minimumOn fst $ VU.fromList [(1,'a'), (1 :: Int,'b')]
15371539
-- (1,'a')
1540+
--
1541+
-- @since 0.13.0.0
15381542
minimumOn :: (Ord b, Unbox a) => (a -> b) -> Vector a -> a
15391543
{-# INLINE minimumOn #-}
15401544
minimumOn = G.minimumOn

vector/src/Data/Vector/Unboxed/Base.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ instance G.Vector Vector () where
214214
-- >>> deriving via (U.UnboxViaPrim Int) instance M.MVector MVector Foo
215215
-- >>> deriving via (U.UnboxViaPrim Int) instance G.Vector Vector Foo
216216
-- >>> instance Unbox Foo
217+
--
218+
-- @since 0.13.0.0
217219
newtype UnboxViaPrim a = UnboxViaPrim a
218220

219221
newtype instance MVector s (UnboxViaPrim a) = MV_UnboxViaPrim (P.MVector s a)
@@ -278,6 +280,7 @@ instance P.Prim a => G.Vector Vector (UnboxViaPrim a) where
278280
-- instance VU.IsoUnbox (Foo a) (Sum Int, Product a)
279281
-- :}
280282
--
283+
-- @since 0.13.0.0
281284
class IsoUnbox a b where
282285
-- | Convert value into it representation in unboxed vector.
283286
toURepr :: a -> b
@@ -338,6 +341,7 @@ idU = id
338341
-- instance VU.Unbox a => VU.Unbox (Bar a)
339342
-- :}
340343
--
344+
-- @since 0.13.0.0
341345
newtype As (a :: Type) (b :: Type) = As a
342346

343347
newtype instance MVector s (As a b) = MV_UnboxAs (MVector s b)

0 commit comments

Comments
 (0)