@@ -26,7 +26,7 @@ module Streamly.Internal.Data.Array.Foreign.Mut.Type
27 -- * Constructing and Writing
27 -- * Constructing and Writing
28 -- ** Construction
28 -- ** Construction
31 -- *** Uninitialized Arrays
31 -- *** Uninitialized Arrays
32 , newArray
32 , newArray
@@ -273,7 +273,7 @@ import Prelude hiding
273-- >>> import qualified Streamly.Internal.Data.Fold.Type as Fold
273-- >>> import qualified Streamly.Internal.Data.Fold.Type as Fold
275-------------------------------------------------------------------------------
275-------------------------------------------------------------------------------
276−-- Array Data Type
276+-- Foreign helpers
277-------------------------------------------------------------------------------
277-------------------------------------------------------------------------------
279foreign import ccall unsafe "string.h memcpy" c_memcpy
279foreign import ccall unsafe "string.h memcpy" c_memcpy
@@ -387,6 +387,13 @@ data Array a =
387 , aBound :: {-# UNPACK #-} !(Ptr a) -- ^ first address beyond allocated memory
387 , aBound :: {-# UNPACK #-} !(Ptr a) -- ^ first address beyond allocated memory
395+nil = Array nilArrayContents nullPtr nullPtr nullPtr
390-- | @fromForeignPtrUnsafe foreignPtr end bound@ creates an 'Array' that starts
397-- | @fromForeignPtrUnsafe foreignPtr end bound@ creates an 'Array' that starts
391-- at the memory pointed by the @foreignPtr@, @end@ is the first unused
398-- at the memory pointed by the @foreignPtr@, @end@ is the first unused
392-- address, and @bound@ is the first address beyond the allocated memory.
399-- address, and @bound@ is the first address beyond the allocated memory.