streamly
streamly copied to clipboard
MutArray and Generic MutArray are using different conventions for field names
MutArray
{ arrContents :: {-# UNPACK #-} !MutableByteArray
, arrStart :: {-# UNPACK #-} !Int -- ^ index into arrContents
, arrEnd :: {-# UNPACK #-} !Int -- ^ index into arrContents
-- Represents the first invalid index of
-- the array.
, arrBound :: {-# UNPACK #-} !Int -- ^ first invalid index of arrContents.
}
MutArray
{ arrContents# :: MutableArray# RealWorld a
-- ^ The internal contents of the array representing the entire array.
, arrStart :: {-# UNPACK #-}!Int
-- ^ The starting index of this slice.
, arrLen :: {-# UNPACK #-}!Int
-- ^ The length of this slice.
, arrTrueLen :: {-# UNPACK #-}!Int
-- ^ This is the true length of the array. Coincidentally, this also
-- represents the first index beyond the maximum acceptable index of
-- the array. This is specific to the array contents itself and not
-- dependent on the slice. This value should not change and is shared
-- across all the slices.
}
Should change the generic array to use the same terminology as unboxed array.