@@ -1145,7 +1145,8 @@ lpackArraysChunksOf n (Fold step1 initial1 extract1) =
1145 -- XXX we can pass the module string from the higher level API
1145 -- XXX we can pass the module string from the higher level API
1146 error $ "Streamly.Internal.Memory.Array.Types.packArraysChunksOf: the size of "
1146 error $ "Streamly.Internal.Memory.Array.Types.packArraysChunksOf: the size of "
1147 ++ "arrays [" ++ show n ++ "] must be a natural number"
1147 ++ "arrays [" ++ show n ++ "] must be a natural number"
1148− Tuple' Nothing <$> initial1
1149+ return (Tuple' Nothing r1)
1150 extract (Tuple' Nothing r1) = extract1 r1
1151 extract (Tuple' Nothing r1) = extract1 r1
1151 extract (Tuple' (Just buf) r1) = do
1152 extract (Tuple' (Just buf) r1) = do
@@ -1158,7 +1159,8 @@ lpackArraysChunksOf n (Fold step1 initial1 extract1) =
1159 r <- step1 r1 arr
1160 r <- step1 r1 arr
1160 extract1 r
1161 extract1 r
1161− Tuple' Nothing <$> initial1
1163+ return (Tuple' Nothing r1')
1162 else return (Tuple' (Just arr) r1)
1164 else return (Tuple' (Just arr) r1)
1164 step (Tuple' (Just buf) r1) arr = do
1166 step (Tuple' (Just buf) r1) arr = do
@@ -1172,7 +1174,8 @@ lpackArraysChunksOf n (Fold step1 initial1 extract1) =
1173 r <- step1 r1 buf''
1175 r <- step1 r1 buf''
1174 extract1 r
1176 extract1 r
1175− Tuple' Nothing <$> initial1
1178+ return (Tuple' Nothing r1')
1176 else return (Tuple' (Just buf'') r1)
1179 else return (Tuple' (Just buf'') r1)
1178#if !defined(mingw32_HOST_OS)
1181#if !defined(mingw32_HOST_OS)