@@ -185,7 +185,7 @@ take :: Property
186 forAll (chooseInt (min_value, max_value)) $ \n ->
186 forAll (chooseInt (min_value, max_value)) $ \n ->
187 forAll (listOf (chooseInt (min_value, max_value))) $ \ls ->
187 forAll (listOf (chooseInt (min_value, max_value))) $ \ls ->
188− case S.parseD (P.fromFold $ FL.takeLE n FL.toList) (S.fromList ls) of
188+ case S.parseD (P.fromFold $ FL.take n FL.toList) (S.fromList ls) of
189 Right parsed_list -> checkListEqual parsed_list (Prelude.take n ls)
189 Right parsed_list -> checkListEqual parsed_list (Prelude.take n ls)
190 Left _ -> property False
190 Left _ -> property False
@@ -266,7 +266,7 @@ lookAheadPass :: Property
266lookAheadPass =
266lookAheadPass =
267 forAll (chooseInt (min_value, max_value)) $ \n ->
267 forAll (chooseInt (min_value, max_value)) $ \n ->
269− takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.takeLE n FL.toList
269+ takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.take n FL.toList
270 parseTwice = do
270 parseTwice = do
271 parsed_list_1 <- takeWithoutConsume
271 parsed_list_1 <- takeWithoutConsume
272 parsed_list_2 <- takeWithoutConsume
272 parsed_list_2 <- takeWithoutConsume
@@ -282,7 +282,7 @@ lookAhead :: Property
282lookAhead =
282lookAhead =
283 forAll (chooseInt (min_value, max_value)) $ \n ->
283 forAll (chooseInt (min_value, max_value)) $ \n ->
285− takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.takeLE n FL.toList
285+ takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.take n FL.toList
286 parseTwice = do
286 parseTwice = do
287 parsed_list_1 <- takeWithoutConsume
287 parsed_list_1 <- takeWithoutConsume
288 parsed_list_2 <- takeWithoutConsume
288 parsed_list_2 <- takeWithoutConsume
@@ -360,7 +360,7 @@ sliceSepByMax :: Property
360sliceSepByMax =
360sliceSepByMax =
361 forAll (chooseInt (min_value, max_value)) $ \n ->
361 forAll (chooseInt (min_value, max_value)) $ \n ->
362 forAll (listOf (chooseInt (0, 1))) $ \ls ->
362 forAll (listOf (chooseInt (0, 1))) $ \ls ->
363− case S.parseD (P.fromFold $ FL.sliceSepBy predicate (FL.takeLE n FL.toList)) (S.fromList ls) of
363+ case S.parseD (P.fromFold $ FL.sliceSepBy predicate (FL.take n FL.toList)) (S.fromList ls) of
364 Right parsed_list -> checkListEqual parsed_list (Prelude.take n (Prelude.takeWhile (not . predicate) ls))
364 Right parsed_list -> checkListEqual parsed_list (Prelude.take n (Prelude.takeWhile (not . predicate) ls))
365 Left _ -> property False
365 Left _ -> property False
@@ -417,7 +417,7 @@ teeWithPass =
417 forAll (chooseInt (min_value, max_value)) $ \n ->
417 forAll (chooseInt (min_value, max_value)) $ \n ->
418 forAll (listOf (chooseInt (0, 1))) $ \ls ->
418 forAll (listOf (chooseInt (0, 1))) $ \ls ->
420− prsr = P.fromFold $ FL.takeLE n FL.toList
420+ prsr = P.fromFold $ FL.take n FL.toList
422 case S.parseD (P.teeWith (,) prsr prsr) (S.fromList ls) of
422 case S.parseD (P.teeWith (,) prsr prsr) (S.fromList ls) of
423 Right (ls_1, ls_2) -> checkListEqual (Prelude.take n ls) ls_1 .&&. checkListEqual ls_1 ls_2
423 Right (ls_1, ls_2) -> checkListEqual (Prelude.take n ls) ls_1 .&&. checkListEqual ls_1 ls_2
@@ -557,8 +557,8 @@ applicative =
557 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
557 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
558 let parser =
558 let parser =
560− <$> P.fromFold (FL.takeLE (length list1) FL.toList)
560+ <$> P.fromFold (FL.take (length list1) FL.toList)
561− <*> P.fromFold (FL.takeLE (length list2) FL.toList)
561+ <*> P.fromFold (FL.take (length list2) FL.toList)
562 in monadicIO $ do
562 in monadicIO $ do
563 (olist1, olist2) <-
563 (olist1, olist2) <-
564 run $ S.parseD parser (S.fromList $ list1 ++ list2)
564 run $ S.parseD parser (S.fromList $ list1 ++ list2)
@@ -568,7 +568,7 @@ applicative =
568sequence :: Property
568sequence :: Property
569sequence =
569sequence =
570 forAll (vectorOf 11 (listOf (chooseAny :: Gen Int))) $ \ ins ->
570 forAll (vectorOf 11 (listOf (chooseAny :: Gen Int))) $ \ ins ->
571− let parsers = fmap (\xs -> P.fromFold $ FL.takeLE (length xs) FL.toList) ins
571+ let parsers = fmap (\xs -> P.fromFold $ FL.take (length xs) FL.toList) ins
572 in monadicIO $ do
572 in monadicIO $ do
573 outs <- run $
573 outs <- run $
@@ -581,8 +581,8 @@ monad =
581 forAll (listOf (chooseAny :: Gen Int)) $ \ list1 ->
581 forAll (listOf (chooseAny :: Gen Int)) $ \ list1 ->
582 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
582 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
583 let parser = do
583 let parser = do
584− olist1 <- P.fromFold (FL.takeLE (length list1) FL.toList)
584+ olist1 <- P.fromFold (FL.take (length list1) FL.toList)
585− olist2 <- P.fromFold (FL.takeLE (length list2) FL.toList)
585+ olist2 <- P.fromFold (FL.take (length list2) FL.toList)
586 return (olist1, olist2)
586 return (olist1, olist2)
587 in monadicIO $ do
587 in monadicIO $ do
588 (olist1, olist2) <-
588 (olist1, olist2) <-
@@ -603,7 +603,7 @@ parseMany =
604 $ S.toList
604 $ S.toList
605 $ S.parseManyD
605 $ S.parseManyD
606− (P.fromFold $ FL.takeLE len FL.toList) (S.fromList $ concat ins)
606+ (P.fromFold $ FL.take len FL.toList) (S.fromList $ concat ins)
608 listEquals (==) outs ins
608 listEquals (==) outs ins
@@ -622,7 +622,7 @@ parseUnfold = do
622 monadicIO $ do
622 monadicIO $ do
623 arrays <- S.toList $ S.arraysOf clen (S.fromList ls)
623 arrays <- S.toList $ S.arraysOf clen (S.fromList ls)
624 let src = Source.source (Just (Producer.OuterLoop arrays))
624 let src = Source.source (Just (Producer.OuterLoop arrays))
625− let parser = P.fromFold (FL.takeLE tlen FL.toList)
625+ let parser = P.fromFold (FL.take tlen FL.toList)
626 let readSrc =
626 let readSrc =
627 Source.producer
627 Source.producer
628 $ Producer.concat Producer.fromList A.producer
628 $ Producer.concat Producer.fromList A.producer