@@ -144,8 +144,9 @@ eqP f g s w = eql "orig" (f s) (g t) &&
144 m | l == 0 = n
144 m | l == 0 = n
145 | otherwise = n `mod` l
145 | otherwise = n `mod` l
146 n = fromIntegral w
146 n = fromIntegral w
147− eql d a b | a =^= b = True
147+ eql d a b
148− | otherwise = trace (d ++ ": " ++ show a ++ " /= " ++ show b) False
149+ | otherwise = trace (d ++ ": " ++ show a ++ " /= " ++ show b) False
150-- For tests that have O(n^2) running times or input sizes, resize
151-- For tests that have O(n^2) running times or input sizes, resize
151-- their inputs to the square root of the originals.
152-- their inputs to the square root of the originals.
@@ -187,15 +188,18 @@ s_snoc x = (++ [x]) `eqP` (unpackS . (flip S.snoc) x)
187t_snoc x = (++ [x]) `eqP` (unpackS . (flip T.snoc) x)
188t_snoc x = (++ [x]) `eqP` (unpackS . (flip T.snoc) x)
188tl_snoc x = (++ [x]) `eqP` (unpackS . (flip TL.snoc) x)
189tl_snoc x = (++ [x]) `eqP` (unpackS . (flip TL.snoc) x)
189s_append s = (s++) `eqP` (unpackS . S.append (S.streamList s))
190s_append s = (s++) `eqP` (unpackS . S.append (S.streamList s))
191+s_append_s s = (s++) `eqP`
190−s_append_s s = (s++) `eqP` (unpackS . S.unstream . S.append (S.streamList s))
192+ (unpackS . S.unstream . S.append (S.streamList s))
193+sf_append p s = (L.filter p s++) `eqP`
191−sf_append p s = (L.filter p s++) `eqP` (unpackS . S.append (S.filter p $ S.streamList s))
194+ (unpackS . S.append (S.filter p $ S.streamList s))
192t_append s = (s++) `eqP` (unpackS . T.append (packS s))
195t_append s = (s++) `eqP` (unpackS . T.append (packS s))
194uncons (x:xs) = Just (x,xs)
197uncons (x:xs) = Just (x,xs)
195uncons _ = Nothing
198uncons _ = Nothing
197s_uncons = uncons `eqP` (fmap (second unpackS) . S.uncons)
200s_uncons = uncons `eqP` (fmap (second unpackS) . S.uncons)
201+sf_uncons p = (uncons . L.filter p) `eqP`
198−sf_uncons p = (uncons . L.filter p) `eqP` (fmap (second unpackS) . S.uncons . S.filter p)
202+ (fmap (second unpackS) . S.uncons . S.filter p)
199t_uncons = uncons `eqP` (fmap (second unpackS) . T.uncons)
203t_uncons = uncons `eqP` (fmap (second unpackS) . T.uncons)
200tl_uncons = uncons `eqP` (fmap (second unpackS) . TL.uncons)
204tl_uncons = uncons `eqP` (fmap (second unpackS) . TL.uncons)
201s_head = head `eqP` S.head
205s_head = head `eqP` S.head
@@ -233,21 +237,31 @@ s_map_s f = map f `eqP` (unpackS . S.unstream . S.map f)
233sf_map p f = (map f . L.filter p) `eqP` (unpackS . S.map f . S.filter p)
237sf_map p f = (map f . L.filter p) `eqP` (unpackS . S.map f . S.filter p)
234t_map f = map f `eqP` (unpackS . T.map f)
238t_map f = map f `eqP` (unpackS . T.map f)
235tl_map f = map f `eqP` (unpackS . TL.map f)
239tl_map f = map f `eqP` (unpackS . TL.map f)
236−t_intercalate c = unsquare (L.intercalate c `eq` (unpackS . T.intercalate (packS c) . map packS))
240+t_intercalate c = unsquare $ L.intercalate c `eq`
241+ (unpackS . T.intercalate (packS c) . map packS)
242+tl_intercalate c = unsquare $
243+ L.intercalate c `eq`
237−tl_intercalate c = unsquare (L.intercalate c `eq` (unpackS . TL.intercalate (TL.pack c) . map TL.pack))
244+ (unpackS . TL.intercalate (TL.pack c) . map TL.pack)
238−s_intersperse c = L.intersperse c `eqP` (unpackS . S.intersperse c)
245+s_intersperse c = L.intersperse c `eqP`
246+ (unpackS . S.intersperse c)
239−s_intersperse_s c = L.intersperse c `eqP` (unpackS . S.unstream . S.intersperse c)
247+s_intersperse_s c = L.intersperse c `eqP`
248+ (unpackS . S.unstream . S.intersperse c)
240−sf_intersperse p c= (L.intersperse c . L.filter p) `eqP` (unpackS . S.intersperse c . S.filter p)
249+sf_intersperse p c= (L.intersperse c . L.filter p) `eqP`
250+ (unpackS . S.intersperse c . S.filter p)
241t_intersperse c = L.intersperse c `eqP` (unpackS . T.intersperse c)
251t_intersperse c = L.intersperse c `eqP` (unpackS . T.intersperse c)
242tl_intersperse c = L.intersperse c `eqP` (unpackS . TL.intersperse c)
252tl_intersperse c = L.intersperse c `eqP` (unpackS . TL.intersperse c)
243−t_transpose = unsquare (L.transpose `eq` (map unpackS . T.transpose . map packS))
253+t_transpose = unsquare $ L.transpose `eq`
254+ (map unpackS . T.transpose . map packS)
244−tl_transpose = unsquare (L.transpose `eq` (map unpackS . TL.transpose . map TL.pack))
255+tl_transpose = unsquare $ L.transpose `eq`
256+ (map unpackS . TL.transpose . map TL.pack)
245t_reverse = L.reverse `eqP` (unpackS . T.reverse)
257t_reverse = L.reverse `eqP` (unpackS . T.reverse)
246tl_reverse = L.reverse `eqP` (unpackS . TL.reverse)
258tl_reverse = L.reverse `eqP` (unpackS . TL.reverse)
247t_reverse_short n = L.reverse `eqP` (unpackS . S.reverse . shorten n . S.stream)
259t_reverse_short n = L.reverse `eqP` (unpackS . S.reverse . shorten n . S.stream)
249−t_replace s d = (L.intercalate d . split s) `eqP` (unpackS . T.replace (T.pack s) (T.pack d))
261+t_replace s d = (L.intercalate d . split s) `eqP`
262+ (unpackS . T.replace (T.pack s) (T.pack d))
250−tl_replace s d = (L.intercalate d . split s) `eqP` (unpackS . TL.replace (TL.pack s) (TL.pack d))
263+tl_replace s d = (L.intercalate d . split s) `eqP`
264+ (unpackS . TL.replace (TL.pack s) (TL.pack d))
252split :: (Eq a) => [a] -> [a] -> [[a]]
266split :: (Eq a) => [a] -> [a] -> [[a]]
253split pat src0
267split pat src0
@@ -292,31 +306,35 @@ center k c xs
293s_justifyLeft k c = justifyLeft j c `eqP` (unpackS . S.justifyLeftI j c)
307s_justifyLeft k c = justifyLeft j c `eqP` (unpackS . S.justifyLeftI j c)
294 where j = fromIntegral (k :: Word8)
308 where j = fromIntegral (k :: Word8)
295−s_justifyLeft_s k c = justifyLeft j c `eqP` (unpackS . S.unstream . S.justifyLeftI j c)
309+s_justifyLeft_s k c = justifyLeft j c `eqP`
310+ (unpackS . S.unstream . S.justifyLeftI j c)
296 where j = fromIntegral (k :: Word8)
311 where j = fromIntegral (k :: Word8)
297sf_justifyLeft p k c = (justifyLeft j c . L.filter p) `eqP`
312sf_justifyLeft p k c = (justifyLeft j c . L.filter p) `eqP`
298 (unpackS . S.justifyLeftI j c . S.filter p)
313 (unpackS . S.justifyLeftI j c . S.filter p)
299 where j = fromIntegral (k :: Word8)
314 where j = fromIntegral (k :: Word8)
300t_justifyLeft k c = justifyLeft j c `eqP` (unpackS . T.justifyLeft j c)
315t_justifyLeft k c = justifyLeft j c `eqP` (unpackS . T.justifyLeft j c)
301 where j = fromIntegral (k :: Word8)
316 where j = fromIntegral (k :: Word8)
317+tl_justifyLeft k c = justifyLeft j c `eqP`
302−tl_justifyLeft k c = justifyLeft j c `eqP` (unpackS . TL.justifyLeft (fromIntegral j) c)
318+ (unpackS . TL.justifyLeft (fromIntegral j) c)
303 where j = fromIntegral (k :: Word8)
319 where j = fromIntegral (k :: Word8)
304t_justifyRight k c = justifyRight j c `eqP` (unpackS . T.justifyRight j c)
320t_justifyRight k c = justifyRight j c `eqP` (unpackS . T.justifyRight j c)
305 where j = fromIntegral (k :: Word8)
321 where j = fromIntegral (k :: Word8)
322+tl_justifyRight k c = justifyRight j c `eqP`
306−tl_justifyRight k c = justifyRight j c `eqP` (unpackS . TL.justifyRight (fromIntegral j) c)
323+ (unpackS . TL.justifyRight (fromIntegral j) c)
307 where j = fromIntegral (k :: Word8)
324 where j = fromIntegral (k :: Word8)
308t_center k c = center j c `eqP` (unpackS . T.center j c)
325t_center k c = center j c `eqP` (unpackS . T.center j c)
309 where j = fromIntegral (k :: Word8)
326 where j = fromIntegral (k :: Word8)
310tl_center k c = center j c `eqP` (unpackS . TL.center (fromIntegral j) c)
327tl_center k c = center j c `eqP` (unpackS . TL.center (fromIntegral j) c)
311 where j = fromIntegral (k :: Word8)
328 where j = fromIntegral (k :: Word8)
313−sf_foldl p f z = (L.foldl f z . L.filter p) `eqP` (S.foldl f z . S.filter p)
330+sf_foldl p f z = (L.foldl f z . L.filter p) `eqP` (S.foldl f z . S.filter p)
314 where _types = f :: Char -> Char -> Char
331 where _types = f :: Char -> Char -> Char
315t_foldl f z = L.foldl f z `eqP` (T.foldl f z)
332t_foldl f z = L.foldl f z `eqP` (T.foldl f z)
316 where _types = f :: Char -> Char -> Char
333 where _types = f :: Char -> Char -> Char
317tl_foldl f z = L.foldl f z `eqP` (TL.foldl f z)
334tl_foldl f z = L.foldl f z `eqP` (TL.foldl f z)
318 where _types = f :: Char -> Char -> Char
335 where _types = f :: Char -> Char -> Char
319−sf_foldl' p f z = (L.foldl' f z . L.filter p) `eqP` (S.foldl' f z . S.filter p)
336+sf_foldl' p f z = (L.foldl' f z . L.filter p) `eqP`
337+ (S.foldl' f z . S.filter p)
320 where _types = f :: Char -> Char -> Char
338 where _types = f :: Char -> Char -> Char
321t_foldl' f z = L.foldl' f z `eqP` T.foldl' f z
339t_foldl' f z = L.foldl' f z `eqP` T.foldl' f z
322 where _types = f :: Char -> Char -> Char
340 where _types = f :: Char -> Char -> Char
@@ -338,13 +356,18 @@ sf_foldr1 p f = (L.foldr1 f . L.filter p) `eqP` (S.foldr1 f . S.filter p)
338t_foldr1 f = L.foldr1 f `eqP` T.foldr1 f
356t_foldr1 f = L.foldr1 f `eqP` T.foldr1 f
339tl_foldr1 f = L.foldr1 f `eqP` TL.foldr1 f
357tl_foldr1 f = L.foldr1 f `eqP` TL.foldr1 f
359+s_concat_s = unsquare $ L.concat `eq`
341−s_concat_s = unsquare (L.concat `eq` (unpackS . S.unstream . S.concat . map packS))
360+ (unpackS . S.unstream . S.concat . map packS)
342−sf_concat p = unsquare ((L.concat . map (L.filter p)) `eq` (unpackS . S.concat . map (S.filter p . packS)))
361+sf_concat p = unsquare $ (L.concat . map (L.filter p)) `eq`
362+ (unpackS . S.concat . map (S.filter p . packS))
343t_concat = unsquare (L.concat `eq` (unpackS . T.concat . map packS))
363t_concat = unsquare (L.concat `eq` (unpackS . T.concat . map packS))
344tl_concat = unsquare (L.concat `eq` (unpackS . TL.concat . map TL.pack))
364tl_concat = unsquare (L.concat `eq` (unpackS . TL.concat . map TL.pack))
345−sf_concatMap p f = unsquare ((L.concatMap f . L.filter p) `eqP` (unpackS . S.concatMap (packS . f) . S.filter p))
365+sf_concatMap p f = unsquare $ (L.concatMap f . L.filter p) `eqP`
366+ (unpackS . S.concatMap (packS . f) . S.filter p)
367+t_concatMap f = unsquare $
346−t_concatMap f = unsquare (L.concatMap f `eqP` (unpackS . T.concatMap (packS . f)))
368+ L.concatMap f `eqP` (unpackS . T.concatMap (packS . f))
369+tl_concatMap f = unsquare $
347−tl_concatMap f = unsquare (L.concatMap f `eqP` (unpackS . TL.concatMap (TL.pack . f)))
370+ L.concatMap f `eqP` (unpackS . TL.concatMap (TL.pack . f))
348sf_any q p = (L.any p . L.filter q) `eqP` (S.any p . S.filter q)
371sf_any q p = (L.any p . L.filter q) `eqP` (S.any p . S.filter q)
349t_any p = L.any p `eqP` T.any p
372t_any p = L.any p `eqP` T.any p
350tl_any p = L.any p `eqP` TL.any p
373tl_any p = L.any p `eqP` TL.any p
@@ -358,7 +381,8 @@ sf_minimum p = (L.minimum . L.filter p) `eqP` (S.minimum . S.filter p)
358t_minimum = L.minimum `eqP` T.minimum
381t_minimum = L.minimum `eqP` T.minimum
359tl_minimum = L.minimum `eqP` TL.minimum
382tl_minimum = L.minimum `eqP` TL.minimum
361−sf_scanl p f z = (L.scanl f z . L.filter p) `eqP` (unpackS . S.scanl f z . S.filter p)
384+sf_scanl p f z = (L.scanl f z . L.filter p) `eqP`
385+ (unpackS . S.scanl f z . S.filter p)
362t_scanl f z = L.scanl f z `eqP` (unpackS . T.scanl f z)
386t_scanl f z = L.scanl f z `eqP` (unpackS . T.scanl f z)
363tl_scanl f z = L.scanl f z `eqP` (unpackS . TL.scanl f z)
387tl_scanl f z = L.scanl f z `eqP` (unpackS . TL.scanl f z)
364t_scanl1 f = L.scanl1 f `eqP` (unpackS . T.scanl1 f)
388t_scanl1 f = L.scanl1 f `eqP` (unpackS . T.scanl1 f)
@@ -368,20 +392,25 @@ tl_scanr f z = L.scanr f z `eqP` (unpackS . TL.scanr f z)
368t_scanr1 f = L.scanr1 f `eqP` (unpackS . T.scanr1 f)
392t_scanr1 f = L.scanr1 f `eqP` (unpackS . T.scanr1 f)
369tl_scanr1 f = L.scanr1 f `eqP` (unpackS . TL.scanr1 f)
393tl_scanr1 f = L.scanr1 f `eqP` (unpackS . TL.scanr1 f)
395+t_mapAccumL f z = unsquare $
371−t_mapAccumL f z = unsquare (L.mapAccumL f z `eqP` (second unpackS . T.mapAccumL f z))
396+ L.mapAccumL f z `eqP` (second unpackS . T.mapAccumL f z)
372 where _types = f :: Int -> Char -> (Int,Char)
397 where _types = f :: Int -> Char -> (Int,Char)
398+tl_mapAccumL f z = unsquare $
373−tl_mapAccumL f z = unsquare (L.mapAccumL f z `eqP` (second unpackS . TL.mapAccumL f z))
399+ L.mapAccumL f z `eqP` (second unpackS . TL.mapAccumL f z)
374 where _types = f :: Int -> Char -> (Int,Char)
400 where _types = f :: Int -> Char -> (Int,Char)
401+t_mapAccumR f z = unsquare $
375−t_mapAccumR f z = unsquare (L.mapAccumR f z `eqP` (second unpackS . T.mapAccumR f z))
402+ L.mapAccumR f z `eqP` (second unpackS . T.mapAccumR f z)
376 where _types = f :: Int -> Char -> (Int,Char)
403 where _types = f :: Int -> Char -> (Int,Char)
404+tl_mapAccumR f z = unsquare $
377−tl_mapAccumR f z = unsquare (L.mapAccumR f z `eqP` (second unpackS . TL.mapAccumR f z))
405+ L.mapAccumR f z `eqP` (second unpackS . TL.mapAccumR f z)
378 where _types = f :: Int -> Char -> (Int,Char)
406 where _types = f :: Int -> Char -> (Int,Char)
380replicate n l = concat (L.replicate n l)
408replicate n l = concat (L.replicate n l)
382t_replicate n = replicate m `eq` (unpackS . T.replicate m . packS)
410t_replicate n = replicate m `eq` (unpackS . T.replicate m . packS)
383 where m = fromIntegral (n :: Word8)
411 where m = fromIntegral (n :: Word8)
412+tl_replicate n = replicate m `eq`
384−tl_replicate n = replicate m `eq` (unpackS . TL.replicate (fromIntegral m) . packS)
413+ (unpackS . TL.replicate (fromIntegral m) . packS)
385 where m = fromIntegral (n :: Word8)
414 where m = fromIntegral (n :: Word8)
387unf :: Int -> Char -> Maybe (Char, Char)
416unf :: Int -> Char -> Maybe (Char, Char)
@@ -407,33 +436,42 @@ unpack2 = unpackS *** unpackS
407s_take n = L.take n `eqP` (unpackS . S.take n)
436s_take n = L.take n `eqP` (unpackS . S.take n)
408s_take_s m = L.take n `eqP` (unpackS . S.unstream . S.take n)
437s_take_s m = L.take n `eqP` (unpackS . S.unstream . S.take n)
409 where n = small m
438 where n = small m
410−sf_take p n = (L.take n . L.filter p) `eqP` (unpackS . S.take n . S.filter p)
439+sf_take p n = (L.take n . L.filter p) `eqP`
440+ (unpackS . S.take n . S.filter p)
411t_take n = L.take n `eqP` (unpackS . T.take n)
441t_take n = L.take n `eqP` (unpackS . T.take n)
412tl_take n = L.take n `eqP` (unpackS . TL.take (fromIntegral n))
442tl_take n = L.take n `eqP` (unpackS . TL.take (fromIntegral n))
413s_drop n = L.drop n `eqP` (unpackS . S.drop n)
443s_drop n = L.drop n `eqP` (unpackS . S.drop n)
414s_drop_s m = L.drop n `eqP` (unpackS . S.unstream . S.drop n)
444s_drop_s m = L.drop n `eqP` (unpackS . S.unstream . S.drop n)
415 where n = small m
445 where n = small m
416−sf_drop p n = (L.drop n . L.filter p) `eqP` (unpackS . S.drop n . S.filter p)
446+sf_drop p n = (L.drop n . L.filter p) `eqP`
447+ (unpackS . S.drop n . S.filter p)
417t_drop n = L.drop n `eqP` (unpackS . T.drop n)
448t_drop n = L.drop n `eqP` (unpackS . T.drop n)
418tl_drop n = L.drop n `eqP` (unpackS . TL.drop (fromIntegral n))
449tl_drop n = L.drop n `eqP` (unpackS . TL.drop (fromIntegral n))
419s_take_drop m = (L.take n . L.drop n) `eqP` (unpackS . S.take n . S.drop n)
450s_take_drop m = (L.take n . L.drop n) `eqP` (unpackS . S.take n . S.drop n)
420 where n = small m
451 where n = small m
421−s_take_drop_s m = (L.take n . L.drop n) `eqP` (unpackS . S.unstream . S.take n . S.drop n)
452+s_take_drop_s m = (L.take n . L.drop n) `eqP`
453+ (unpackS . S.unstream . S.take n . S.drop n)
422 where n = small m
454 where n = small m
423s_takeWhile p = L.takeWhile p `eqP` (unpackS . S.takeWhile p)
455s_takeWhile p = L.takeWhile p `eqP` (unpackS . S.takeWhile p)
424s_takeWhile_s p = L.takeWhile p `eqP` (unpackS . S.unstream . S.takeWhile p)
456s_takeWhile_s p = L.takeWhile p `eqP` (unpackS . S.unstream . S.takeWhile p)
425−sf_takeWhile q p = (L.takeWhile p . L.filter q) `eqP` (unpackS . S.takeWhile p . S.filter q)
457+sf_takeWhile q p = (L.takeWhile p . L.filter q) `eqP`
458+ (unpackS . S.takeWhile p . S.filter q)
426t_takeWhile p = L.takeWhile p `eqP` (unpackS . T.takeWhile p)
459t_takeWhile p = L.takeWhile p `eqP` (unpackS . T.takeWhile p)
427tl_takeWhile p = L.takeWhile p `eqP` (unpackS . TL.takeWhile p)
460tl_takeWhile p = L.takeWhile p `eqP` (unpackS . TL.takeWhile p)
428s_dropWhile p = L.dropWhile p `eqP` (unpackS . S.dropWhile p)
461s_dropWhile p = L.dropWhile p `eqP` (unpackS . S.dropWhile p)
429s_dropWhile_s p = L.dropWhile p `eqP` (unpackS . S.unstream . S.dropWhile p)
462s_dropWhile_s p = L.dropWhile p `eqP` (unpackS . S.unstream . S.dropWhile p)
430−sf_dropWhile q p = (L.dropWhile p . L.filter q) `eqP` (unpackS . S.dropWhile p . S.filter q)
463+sf_dropWhile q p = (L.dropWhile p . L.filter q) `eqP`
464+ (unpackS . S.dropWhile p . S.filter q)
431t_dropWhile p = L.dropWhile p `eqP` (unpackS . T.dropWhile p)
465t_dropWhile p = L.dropWhile p `eqP` (unpackS . T.dropWhile p)
432tl_dropWhile p = L.dropWhile p `eqP` (unpackS . S.dropWhile p)
466tl_dropWhile p = L.dropWhile p `eqP` (unpackS . S.dropWhile p)
433−t_dropWhileEnd p = (L.reverse . L.dropWhile p . L.reverse) `eqP` (unpackS . T.dropWhileEnd p)
467+t_dropWhileEnd p = (L.reverse . L.dropWhile p . L.reverse) `eqP`
468+ (unpackS . T.dropWhileEnd p)
434−tl_dropWhileEnd p = (L.reverse . L.dropWhile p . L.reverse) `eqP` (unpackS . TL.dropWhileEnd p)
469+tl_dropWhileEnd p = (L.reverse . L.dropWhile p . L.reverse) `eqP`
470+ (unpackS . TL.dropWhileEnd p)
435−t_dropAround p = (L.dropWhile p . L.reverse . L.dropWhile p . L.reverse) `eqP` (unpackS . T.dropAround p)
471+t_dropAround p = (L.dropWhile p . L.reverse . L.dropWhile p . L.reverse)
472+ `eqP` (unpackS . T.dropAround p)
436−tl_dropAround p = (L.dropWhile p . L.reverse . L.dropWhile p . L.reverse) `eqP` (unpackS . TL.dropAround p)
473+tl_dropAround p = (L.dropWhile p . L.reverse . L.dropWhile p . L.reverse)
474+ `eqP` (unpackS . TL.dropAround p)
437t_stripStart = T.dropWhile isSpace `eq` T.stripStart
475t_stripStart = T.dropWhile isSpace `eq` T.stripStart
438tl_stripStart = TL.dropWhile isSpace `eq` TL.stripStart
476tl_stripStart = TL.dropWhile isSpace `eq` TL.stripStart
439t_stripEnd = T.dropWhileEnd isSpace `eq` T.stripEnd
477t_stripEnd = T.dropWhileEnd isSpace `eq` T.stripEnd
@@ -492,7 +530,8 @@ t_split_i (NotEmpty t) = id `eq` (T.intercalate t . T.split t)
492tl_split_i (NotEmpty t) = id `eq` (TL.intercalate t . TL.split t)
530tl_split_i (NotEmpty t) = id `eq` (TL.intercalate t . TL.split t)
494t_splitBy p = splitBy p `eqP` (map unpackS . T.splitBy p)
532t_splitBy p = splitBy p `eqP` (map unpackS . T.splitBy p)
495−t_splitBy_count c = (L.length . T.splitBy (==c)) `eq` ((1+) . T.count (T.singleton c))
533+t_splitBy_count c = (L.length . T.splitBy (==c)) `eq`
534+ ((1+) . T.count (T.singleton c))
496t_splitBy_split c = T.splitBy (==c) `eq` T.split (T.singleton c)
535t_splitBy_split c = T.splitBy (==c) `eq` T.split (T.singleton c)
497tl_splitBy p = splitBy p `eqP` (map unpackS . TL.splitBy p)
536tl_splitBy p = splitBy p `eqP` (map unpackS . TL.splitBy p)
@@ -512,7 +551,8 @@ t_chunksOf_length k t = len == T.length t || (k <= 0 && len == 0)
513chunkify = TL.fromChunks . (:[])
552chunkify = TL.fromChunks . (:[])
515−tl_chunksOf k = T.chunksOf k `eq` (map (T.concat . TL.toChunks) . TL.chunksOf (fromIntegral k) . chunkify)
554+tl_chunksOf k = T.chunksOf k `eq` (map (T.concat . TL.toChunks) .
555+ TL.chunksOf (fromIntegral k) . chunkify)
517t_lines = L.lines `eqP` (map unpackS . T.lines)
557t_lines = L.lines `eqP` (map unpackS . T.lines)
518tl_lines = L.lines `eqP` (map unpackS . TL.lines)
558tl_lines = L.lines `eqP` (map unpackS . TL.lines)
@@ -534,8 +574,10 @@ tl_unlines = unsquare (L.unlines `eq` (unpackS . TL.unlines . map packS))
534t_unwords = unsquare (L.unwords `eq` (unpackS . T.unwords . map packS))
574t_unwords = unsquare (L.unwords `eq` (unpackS . T.unwords . map packS))
535tl_unwords = unsquare (L.unwords `eq` (unpackS . TL.unwords . map packS))
575tl_unwords = unsquare (L.unwords `eq` (unpackS . TL.unwords . map packS))
577+s_isPrefixOf s = L.isPrefixOf s `eqP`
537−s_isPrefixOf s = L.isPrefixOf s `eqP` (S.isPrefixOf (S.stream $ packS s) . S.stream)
578+ (S.isPrefixOf (S.stream $ packS s) . S.stream)
579+sf_isPrefixOf p s = (L.isPrefixOf s . L.filter p) `eqP`
538−sf_isPrefixOf p s = (L.isPrefixOf s . L.filter p) `eqP` (S.isPrefixOf (S.stream $ packS s) . S.filter p . S.stream)
580+ (S.isPrefixOf (S.stream $ packS s) . S.filter p . S.stream)
539t_isPrefixOf s = L.isPrefixOf s`eqP` T.isPrefixOf (packS s)
581t_isPrefixOf s = L.isPrefixOf s`eqP` T.isPrefixOf (packS s)
540tl_isPrefixOf s = L.isPrefixOf s`eqP` TL.isPrefixOf (packS s)
582tl_isPrefixOf s = L.isPrefixOf s`eqP` TL.isPrefixOf (packS s)
541t_isSuffixOf s = L.isSuffixOf s`eqP` T.isSuffixOf (packS s)
583t_isSuffixOf s = L.isSuffixOf s`eqP` T.isSuffixOf (packS s)
@@ -557,7 +599,8 @@ t_suffixed s = (fmap packS . suffixed s) `eqP` T.suffixed (packS s)
557tl_suffixed s = (fmap packS . suffixed s) `eqP` TL.suffixed (packS s)
599tl_suffixed s = (fmap packS . suffixed s) `eqP` TL.suffixed (packS s)
559sf_elem p c = (L.elem c . L.filter p) `eqP` (S.elem c . S.filter p)
601sf_elem p c = (L.elem c . L.filter p) `eqP` (S.elem c . S.filter p)
560−sf_filter q p = (L.filter p . L.filter q) `eqP` (unpackS . S.filter p . S.filter q)
602+sf_filter q p = (L.filter p . L.filter q) `eqP`
603+ (unpackS . S.filter p . S.filter q)
561t_filter p = L.filter p `eqP` (unpackS . T.filter p)
604t_filter p = L.filter p `eqP` (unpackS . T.filter p)
562tl_filter p = L.filter p `eqP` (unpackS . TL.filter p)
605tl_filter p = L.filter p `eqP` (unpackS . TL.filter p)
563sf_findBy q p = (L.find p . L.filter q) `eqP` (S.findBy p . S.filter q)
606sf_findBy q p = (L.find p . L.filter q) `eqP` (S.findBy p . S.filter q)
@@ -566,20 +609,24 @@ tl_findBy p = L.find p `eqP` TL.findBy p
566t_partition p = L.partition p `eqP` (unpack2 . T.partitionBy p)
609t_partition p = L.partition p `eqP` (unpack2 . T.partitionBy p)
567tl_partition p = L.partition p `eqP` (unpack2 . TL.partitionBy p)
610tl_partition p = L.partition p `eqP` (unpack2 . TL.partitionBy p)
612+sf_index p s = forAll (choose (-l,l*2))
569−sf_index p s = forAll (choose (-l,l*2)) ((L.filter p s L.!!) `eq` S.index (S.filter p $ packS s))
613+ ((L.filter p s L.!!) `eq` S.index (S.filter p $ packS s))
570 where l = L.length s
614 where l = L.length s
571t_index s = forAll (choose (-l,l*2)) ((s L.!!) `eq` T.index (packS s))
615t_index s = forAll (choose (-l,l*2)) ((s L.!!) `eq` T.index (packS s))
572 where l = L.length s
616 where l = L.length s
618+tl_index s = forAll (choose (-l,l*2))
574−tl_index s = forAll (choose (-l,l*2)) ((s L.!!) `eq` (TL.index (packS s) . fromIntegral))
619+ ((s L.!!) `eq` (TL.index (packS s) . fromIntegral))
575 where l = L.length s
620 where l = L.length s
577t_findIndex p = L.findIndex p `eqP` T.findIndex p
622t_findIndex p = L.findIndex p `eqP` T.findIndex p
578t_count (NotEmpty t) = (subtract 1 . L.length . T.split t) `eq` T.count t
623t_count (NotEmpty t) = (subtract 1 . L.length . T.split t) `eq` T.count t
579−tl_count (NotEmpty t) = (subtract 1 . L.genericLength . TL.split t) `eq` TL.count t
624+tl_count (NotEmpty t) = (subtract 1 . L.genericLength . TL.split t) `eq`
580t_zip s = L.zip s `eqP` T.zip (packS s)
626t_zip s = L.zip s `eqP` T.zip (packS s)
581tl_zip s = L.zip s `eqP` TL.zip (packS s)
627tl_zip s = L.zip s `eqP` TL.zip (packS s)
582−sf_zipWith p c s = (L.zipWith c (L.filter p s) . L.filter p) `eqP` (unpackS . S.zipWith c (S.filter p $ packS s) . S.filter p)
628+sf_zipWith p c s = (L.zipWith c (L.filter p s) . L.filter p) `eqP`
629+ (unpackS . S.zipWith c (S.filter p $ packS s) . S.filter p)
583t_zipWith c s = L.zipWith c s `eqP` (unpackS . T.zipWith c (packS s))
630t_zipWith c s = L.zipWith c s `eqP` (unpackS . T.zipWith c (packS s))
584tl_zipWith c s = L.zipWith c s `eqP` (unpackS . TL.zipWith c (packS s))
631tl_zipWith c s = L.zipWith c s `eqP` (unpackS . TL.zipWith c (packS s))
@@ -608,13 +655,16 @@ shiftR_Word32 = shiftR :: Word32 -> Property
609-- Builder.
656-- Builder.
658+t_builderSingleton = id `eqP`
611−t_builderSingleton = id `eqP` (unpackS . TB.toLazyText . mconcat . map TB.singleton)
659+ (unpackS . TB.toLazyText . mconcat . map TB.singleton)
612−t_builderFromText = L.concat `eq` (unpackS . TB.toLazyText . mconcat . map (TB.fromText . packS))
660+t_builderFromText = L.concat `eq` (unpackS . TB.toLazyText . mconcat .
661+ map (TB.fromText . packS))
662+t_builderAssociative s1 s2 s3 =
613−t_builderAssociative s1 s2 s3 = TB.toLazyText (b1 `mappend` (b2 `mappend` b3)) ==
663+ TB.toLazyText (b1 `mappend` (b2 `mappend` b3)) ==
614− TB.toLazyText ((b1 `mappend` b2) `mappend` b3)
664+ TB.toLazyText ((b1 `mappend` b2) `mappend` b3)
615− where b1 = TB.fromText (packS s1)
665+ where b1 = TB.fromText (packS s1)
616− b2 = TB.fromText (packS s2)
666+ b2 = TB.fromText (packS s2)
617− b3 = TB.fromText (packS s3)
667+ b3 = TB.fromText (packS s3)
619-- Input and output.
669-- Input and output.
@@ -647,8 +697,8 @@ instance Arbitrary BufferMode where
647 arbitrary = oneof [ return NoBuffering,
697 arbitrary = oneof [ return NoBuffering,
648 return LineBuffering,
698 return LineBuffering,
649 return (BlockBuffering Nothing),
699 return (BlockBuffering Nothing),
650− (BlockBuffering . Just . (+1) . fromIntegral) `fmap` arb16 ]
700+ (BlockBuffering . Just . (+1) . fromIntegral) `fmap`
651− where arb16 = arbitrary :: Gen Word16
701+ (arbitrary :: Gen Word16) ]
653-- This test harness is complex! What property are we checking?
703-- This test harness is complex! What property are we checking?