@@ -91,7 +91,7 @@ module Streamly.Internal.Data.Array.Foreign
91 -- * Casting
91 -- * Casting
94− , unsafeCast -- castUnsafe?
94+ , castUnsafe
95 , asPtrUnsafe
95 , asPtrUnsafe
96 , unsafeAsCString -- asCStringUnsafe?
96 , unsafeAsCString -- asCStringUnsafe?
97 , A.unsafeFreeze -- asImmutableUnsafe?
97 , A.unsafeFreeze -- asImmutableUnsafe?
@@ -525,12 +525,12 @@ streamTransform f arr =
526-- /Pre-release/
526-- /Pre-release/
528−unsafeCast ::
528+castUnsafe ::
529#ifdef DEVBUILD
529#ifdef DEVBUILD
530 Storable b =>
530 Storable b =>
532 Array a -> Array b
532 Array a -> Array b
533−unsafeCast (Array contents start end) =
533+castUnsafe (Array contents start end) =
534 Array contents (castPtr start) (castPtr end)
534 Array contents (castPtr start) (castPtr end)
536-- | Cast an @Array a@ into an @Array Word8@.
536-- | Cast an @Array a@ into an @Array Word8@.
@@ -538,7 +538,7 @@ unsafeCast (Array contents start end) =
538-- @since 0.8.0
538-- @since 0.8.0
540asBytes :: Array a -> Array Word8
540asBytes :: Array a -> Array Word8
541−asBytes = unsafeCast
541+asBytes = castUnsafe
543-- | Cast an array having elements of type @a@ into an array having elements of
543-- | Cast an array having elements of type @a@ into an array having elements of
544-- type @b@. The length of the array should be a multiple of the size of the
544-- type @b@. The length of the array should be a multiple of the size of the
@@ -552,7 +552,7 @@ cast arr =
552 r = len `mod` SIZE_OF(b)
552 r = len `mod` SIZE_OF(b)
553 in if r /= 0
553 in if r /= 0
554 then Nothing
554 then Nothing
555− else Just $ unsafeCast arr
555+ else Just $ castUnsafe arr
557-- | Convert an array of any type into a null terminated CString Ptr.
557-- | Convert an array of any type into a null terminated CString Ptr.