@@ -28,8 +28,8 @@ module Streamly.Internal.Data.Unbox
2828 , pin
2929 , unpin
3030 , newBytesAs
31− , newBytes
32− , pinnedNewBytes
31+ , newByteArray
32+ , pinnedNewByteArray
3333 , pinnedNewAlignedBytes
3434
3535 -- ** Unbox type class
@@ -167,23 +167,23 @@ asPtrUnsafe arr f = do
167167
168168{-# NOINLINE nil #-}
169169nil :: MutByteArray
170−nil = unsafePerformIO $ newBytes 0
170+nil = unsafePerformIO $ newByteArray 0
171171
172−{-# INLINE newBytes #-}
173−newBytes :: Int -> IO MutByteArray
174−newBytes nbytes | nbytes < 0 =
175− errorWithoutStackTrace "newBytes: size must be >= 0"
176−newBytes (I# nbytes) = IO $ \s ->
172+{-# INLINE newByteArray #-}
173+newByteArray :: Int -> IO MutByteArray
174+newByteArray nbytes | nbytes < 0 =
175+ errorWithoutStackTrace "newByteArray: size must be >= 0"
176+newByteArray (I# nbytes) = IO $ \s ->
177177 case newByteArray# nbytes s of
178178 (# s', mbarr# #) ->
179179 let c = MutByteArray mbarr#
180180 in (# s', c #)
181181
182−{-# INLINE pinnedNewBytes #-}
183−pinnedNewBytes :: Int -> IO MutByteArray
184−pinnedNewBytes nbytes | nbytes < 0 =
185− errorWithoutStackTrace "pinnedNewBytes: size must be >= 0"
186−pinnedNewBytes (I# nbytes) = IO $ \s ->
182+{-# INLINE pinnedNewByteArray #-}
183+pinnedNewByteArray :: Int -> IO MutByteArray
184+pinnedNewByteArray nbytes | nbytes < 0 =
185+ errorWithoutStackTrace "pinnedNewByteArray: size must be >= 0"
186+pinnedNewByteArray (I# nbytes) = IO $ \s ->
187187 case newPinnedByteArray# nbytes s of
188188 (# s', mbarr# #) ->
189189 let c = MutByteArray mbarr#
@@ -201,8 +201,8 @@ pinnedNewAlignedBytes (I# nbytes) (I# align) = IO $ \s ->
201201
202202{-# INLINE newBytesAs #-}
203203newBytesAs :: PinnedState -> Int -> IO MutByteArray
204−newBytesAs Unpinned = newBytes
205−newBytesAs Pinned = pinnedNewBytes
204+newBytesAs Unpinned = newByteArray
205+newBytesAs Pinned = pinnedNewByteArray
206206
207207-------------------------------------------------------------------------------
208208-- Copying