[commit: packages/bytestring] master: We should not have exported breakByte, add a deprecation message (ee2b178)

git at git.haskell.org git at git.haskell.org
Fri Jan 23 22:43:31 UTC 2015


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

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

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

commit ee2b178f093c949c4eda934c9ae1a1b64ea19b67
Author: Duncan Coutts <duncan at community.haskell.org>
Date:   Sun Dec 14 14:10:44 2014 +0000

    We should not have exported breakByte, add a deprecation message


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

ee2b178f093c949c4eda934c9ae1a1b64ea19b67
 Data/ByteString.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Data/ByteString.hs b/Data/ByteString.hs
index afe1442..678fb26 100644
--- a/Data/ByteString.hs
+++ b/Data/ByteString.hs
@@ -929,6 +929,7 @@ breakByte c p = case elemIndex c p of
     Nothing -> (p,empty)
     Just n  -> (unsafeTake n p, unsafeDrop n p)
 {-# INLINE breakByte #-}
+{-# DEPRECATED breakByte "It is an internal function and should never have been exported. Use 'break (== x)' instead. (There are rewrite rules that handle this special case of 'break'.)" #-}
 
 -- | 'breakEnd' behaves like 'break' but from the end of the 'ByteString'
 -- 



More information about the ghc-commits mailing list