@@ -311,16 +311,18 @@ takeProperties =
311311-- where
312312-- list_length = Prelude.length ls
313313
314−sliceSepBy :: Property
315−sliceSepBy =
314+sliceSepByP :: Property
315+sliceSepByP =
316316 forAll (listOf (chooseInt (min_value, max_value ))) $ \ls ->
317− case S.parse (P.sliceSepBy predicate prsr) (S.fromList ls) of
318− Right parsed_list -> checkListEqual parsed_list (Prelude.takeWhile
319− (not. predicate) ls)
317+ case S.parse (P.sliceSepByP predicate prsr) (S.fromList ls) of
318+ Right parsed_list ->
319+ checkListEqual parsed_list (tkwhl ls)
320320 Left _ -> property False
321321 where
322322 predicate = (>= 100)
323323 prsr = P.many FL.toList (P.satisfy (const True))
324+ tkwhl ls = Prelude.takeWhile (not . predicate) ls
325+
324326
325327takeWhile :: Property
326328takeWhile =
@@ -704,7 +706,7 @@ main =
704706 -- prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n" lookAheadPass
705707 -- prop "Fail when stream length exceeded" lookAheadFail
706708 -- prop "lookAhead . take n >> lookAhead . take n = lookAhead . take n, else fail" lookAhead
707− prop "P.sliceSepBy test" Main.sliceSepBy
709+ prop "P.sliceSepByP test" Main.sliceSepByP
708710 prop "P.takeWhile = Prelude.takeWhile" Main.takeWhile
709711 prop ("P.takeWhile1 = Prelude.takeWhile if taken something,"
710712 ++ " else check why failed") takeWhile1