on master help sign in
replace unsafeInlineIO with unsafePerformIO

Since we are performing a side-effect (malloc) inside we need to ensure that it will be performed uniquely every time the code is called.

commitc3ff5d378acb4c9954d255ef852ed40783bfe609 authorHarendra Kumar <harendra.kumar@gmail.com> dateMon 16 Sep 2019, 14:16 (7 years ago) parent661f842
1 file changed+1−1
src/Streamly/Memory/Array/Types.hs+1−1
src/Streamly/Memory/Array/Types.hs+1−1
@@ -922,7 +922,7 @@ spliceTwo arr1 arr2 = do
922922 return arr { aEnd = dst `plusPtr` (len1 + len2) }
923923
924924instance Storable a => Semigroup (Array a) where
925− arr1 <> arr2 = unsafeInlineIO $ spliceTwo arr1 arr2
925+ arr1 <> arr2 = unsafePerformIO $ spliceTwo arr1 arr2
926926
927927nullForeignPtr :: ForeignPtr a
928928nullForeignPtr = ForeignPtr nullAddr# (error "nullForeignPtr")