Commits

Bryan O'Sullivan committed cfbddca

Remove old UTF-8 encoding functions

Comments (0)

Files changed (3)

Data/Text/Encoding.hs

 
     -- * Encoding Text to ByteStrings
     , encodeUtf8
-    , encodeUtf8'
     , encodeUtf16LE
     , encodeUtf16BE
     , encodeUtf32LE
 {-# INLINE decodeUtf8 #-}
 
 -- | Encode text using UTF-8 encoding.
-encodeUtf8' :: Text -> ByteString
-encodeUtf8' txt = E.unstream (E.restreamUtf8 (F.stream txt))
-{-# INLINE encodeUtf8' #-}
-
--- | Encode text using UTF-8 encoding.
 encodeUtf8 :: Text -> ByteString
 encodeUtf8 (Text arr off len) = unsafePerformIO $ do
   let size0 = min len 4

Data/Text/Lazy/Encoding.hs

 
     -- * Encoding Text to ByteStrings
     , encodeUtf8
-    , encodeUtf8'
     , encodeUtf16LE
     , encodeUtf16BE
     , encodeUtf32LE
 decodeUtf8 = decodeUtf8With strictDecode
 {-# INLINE decodeUtf8 #-}
 
--- | Encode text using UTF-8 encoding.
-encodeUtf8' :: Text -> B.ByteString
-encodeUtf8' txt = E.unstream (E.restreamUtf8 (F.stream txt))
-{-# INLINE encodeUtf8' #-}
-
 encodeUtf8 :: Text -> B.ByteString
 encodeUtf8 (Chunk c cs) = B.Chunk (TE.encodeUtf8 c) (encodeUtf8 cs)
 encodeUtf8 Empty        = B.Empty

tests/benchmarks/EncodeUtf8.hs

   let t = TL.replicate (fromIntegral k) (TL.pack s)
   BL.putStr (TL.encodeUtf8 t)
 
-strict_bytestring_ k s = do
-  let t = T.replicate k (T.pack s)
-  B.putStr (T.encodeUtf8' t)
-
-lazy_bytestring_ k s = do
-  let t = TL.replicate (fromIntegral k) (TL.pack s)
-  BL.putStr (TL.encodeUtf8' t)
-
 strict_io k s = do
   let t = T.replicate k (T.pack s)
   hSetEncoding stdout utf8
   case kind of
     "strict" -> strict_bytestring k str
     "lazy" -> lazy_bytestring k str
-    "strict_" -> strict_bytestring_ k str
-    "lazy_" -> lazy_bytestring_ k str
     "strict_io" -> strict_io k str
     "lazy_io" -> lazy_io k str
     "string" -> string k str