@@ -24,8 +24,8 @@ module Streamly.Internal.Data.MutByteArray.Type
2424 -- ** Allocation
2525 , nil
2626 , newBytesAs
27− , newByteArray
28− , pinnedNewByteArray
27+ , new
28+ , pinnedNew
2929 , pinnedNewAlignedBytes
3030
3131 -- ** Access
@@ -122,23 +122,23 @@ asPtrUnsafe arr f = do
122122
123123{-# NOINLINE nil #-}
124124nil :: MutByteArray
125−nil = unsafePerformIO $ newByteArray 0
125+nil = unsafePerformIO $ new 0
126126
127−{-# INLINE newByteArray #-}
128−newByteArray :: Int -> IO MutByteArray
129−newByteArray nbytes | nbytes < 0 =
127+{-# INLINE new #-}
128+new :: Int -> IO MutByteArray
129+new nbytes | nbytes < 0 =
130130 errorWithoutStackTrace "newByteArray: size must be >= 0"
131−newByteArray (I# nbytes) = IO $ \s ->
131+new (I# nbytes) = IO $ \s ->
132132 case newByteArray# nbytes s of
133133 (# s', mbarr# #) ->
134134 let c = MutByteArray mbarr#
135135 in (# s', c #)
136136
137−{-# INLINE pinnedNewByteArray #-}
138−pinnedNewByteArray :: Int -> IO MutByteArray
139−pinnedNewByteArray nbytes | nbytes < 0 =
137+{-# INLINE pinnedNew #-}
138+pinnedNew :: Int -> IO MutByteArray
139+pinnedNew nbytes | nbytes < 0 =
140140 errorWithoutStackTrace "pinnedNewByteArray: size must be >= 0"
141−pinnedNewByteArray (I# nbytes) = IO $ \s ->
141+pinnedNew (I# nbytes) = IO $ \s ->
142142 case newPinnedByteArray# nbytes s of
143143 (# s', mbarr# #) ->
144144 let c = MutByteArray mbarr#
@@ -156,8 +156,8 @@ pinnedNewAlignedBytes (I# nbytes) (I# align) = IO $ \s ->
156156
157157{-# INLINE newBytesAs #-}
158158newBytesAs :: PinnedState -> Int -> IO MutByteArray
159−newBytesAs Unpinned = newByteArray
160−newBytesAs Pinned = pinnedNewByteArray
159+newBytesAs Unpinned = new
160+newBytesAs Pinned = pinnedNew
161161
162162-------------------------------------------------------------------------------
163163-- Copying