[commit: packages/bytestring] master: Add ‘since’ notes to relatively new functions (e338e7a)

git at git.haskell.org git at git.haskell.org
Mon Apr 17 21:31:47 UTC 2017


Repository : ssh://git@git.haskell.org/bytestring

On branch  : master
Link       : http://git.haskell.org/packages/bytestring.git/commitdiff/e338e7aa50d3908f7c402b4ada7c6aded7cd4fe2

>---------------------------------------------------------------

commit e338e7aa50d3908f7c402b4ada7c6aded7cd4fe2
Author: mrkkrp <markkarpov at opmbx.org>
Date:   Fri Nov 4 00:37:51 2016 +0300

    Add ‘since’ notes to relatively new functions


>---------------------------------------------------------------

e338e7aa50d3908f7c402b4ada7c6aded7cd4fe2
 Data/ByteString.hs      | 2 ++
 Data/ByteString/Lazy.hs | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Data/ByteString.hs b/Data/ByteString.hs
index 743bc86..af4e889 100644
--- a/Data/ByteString.hs
+++ b/Data/ByteString.hs
@@ -1273,6 +1273,8 @@ isPrefixOf (PS x1 s1 l1) (PS x2 s2 l2)
 -- | /O(n)/ The 'stripPrefix' function takes two ByteStrings and returns 'Just'
 -- the remainder of the second iff the first is its prefix, and otherwise
 -- 'Nothing'.
+--
+-- @since 0.10.8.0
 stripPrefix :: ByteString -> ByteString -> Maybe ByteString
 stripPrefix bs1@(PS _ _ l1) bs2
    | bs1 `isPrefixOf` bs2 = Just (unsafeDrop l1 bs2)
diff --git a/Data/ByteString/Lazy.hs b/Data/ByteString/Lazy.hs
index 5b1cf5a..5b1d546 100644
--- a/Data/ByteString/Lazy.hs
+++ b/Data/ByteString/Lazy.hs
@@ -890,7 +890,8 @@ elemIndex w cs0 = elemIndex' 0 cs0
 --
 -- > elemIndexEnd c xs ==
 -- > (-) (length xs - 1) `fmap` elemIndex c (reverse xs)
-
+--
+-- @since 0.10.6.0
 elemIndexEnd :: Word8 -> ByteString -> Maybe Int64
 elemIndexEnd w = elemIndexEnd' 0
   where
@@ -1037,6 +1038,8 @@ isPrefixOf (Chunk x xs) (Chunk y ys)
 -- | /O(n)/ The 'stripPrefix' function takes two ByteStrings and returns 'Just'
 -- the remainder of the second iff the first is its prefix, and otherwise
 -- 'Nothing'.
+--
+-- @since 0.10.8.0
 stripPrefix :: ByteString -> ByteString -> Maybe ByteString
 stripPrefix Empty bs  = Just bs
 stripPrefix _ Empty  = Nothing



More information about the ghc-commits mailing list