@@ -185,7 +185,7 @@ take :: Property
185185take =
186186 forAll (chooseInt (min_value, max_value)) $ \n ->
187187 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
189189 Right parsed_list -> checkListEqual parsed_list (Prelude.take n ls)
190190 Left _ -> property False
191191
@@ -266,7 +266,7 @@ lookAheadPass :: Property
266266lookAheadPass =
267267 forAll (chooseInt (min_value, max_value)) $ \n ->
268268 let
269− takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.takeLE n FL.toList
269+ takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.take n FL.toList
270270 parseTwice = do
271271 parsed_list_1 <- takeWithoutConsume
272272 parsed_list_2 <- takeWithoutConsume
@@ -282,7 +282,7 @@ lookAhead :: Property
282282lookAhead =
283283 forAll (chooseInt (min_value, max_value)) $ \n ->
284284 let
285− takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.takeLE n FL.toList
285+ takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.take n FL.toList
286286 parseTwice = do
287287 parsed_list_1 <- takeWithoutConsume
288288 parsed_list_2 <- takeWithoutConsume
@@ -360,7 +360,7 @@ sliceSepByMax :: Property
360360sliceSepByMax =
361361 forAll (chooseInt (min_value, max_value)) $ \n ->
362362 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
364364 Right parsed_list -> checkListEqual parsed_list (Prelude.take n (Prelude.takeWhile (not . predicate) ls))
365365 Left _ -> property False
366366 where
@@ -417,7 +417,7 @@ teeWithPass =
417417 forAll (chooseInt (min_value, max_value)) $ \n ->
418418 forAll (listOf (chooseInt (0, 1))) $ \ls ->
419419 let
420− prsr = P.fromFold $ FL.takeLE n FL.toList
420+ prsr = P.fromFold $ FL.take n FL.toList
421421 in
422422 case S.parseD (P.teeWith (,) prsr prsr) (S.fromList ls) of
423423 Right (ls_1, ls_2) -> checkListEqual (Prelude.take n ls) ls_1 .&&. checkListEqual ls_1 ls_2
@@ -557,8 +557,8 @@ applicative =
557557 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
558558 let parser =
559559 (,)
560− <$> P.fromFold (FL.takeLE (length list1) FL.toList)
561− <*> P.fromFold (FL.takeLE (length list2) FL.toList)
560+ <$> P.fromFold (FL.take (length list1) FL.toList)
561+ <*> P.fromFold (FL.take (length list2) FL.toList)
562562 in monadicIO $ do
563563 (olist1, olist2) <-
564564 run $ S.parseD parser (S.fromList $ list1 ++ list2)
@@ -568,7 +568,7 @@ applicative =
568568sequence :: Property
569569sequence =
570570 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
572572 in monadicIO $ do
573573 outs <- run $
574574 S.parseD
@@ -581,8 +581,8 @@ monad =
581581 forAll (listOf (chooseAny :: Gen Int)) $ \ list1 ->
582582 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
583583 let parser = do
584− olist1 <- P.fromFold (FL.takeLE (length list1) FL.toList)
585− olist2 <- P.fromFold (FL.takeLE (length list2) FL.toList)
584+ olist1 <- P.fromFold (FL.take (length list1) FL.toList)
585+ olist2 <- P.fromFold (FL.take (length list2) FL.toList)
586586 return (olist1, olist2)
587587 in monadicIO $ do
588588 (olist1, olist2) <-
@@ -603,7 +603,7 @@ parseMany =
603603 ( run
604604 $ S.toList
605605 $ 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)
607607 )
608608 listEquals (==) outs ins
609609
@@ -622,7 +622,7 @@ parseUnfold = do
622622 monadicIO $ do
623623 arrays <- S.toList $ S.arraysOf clen (S.fromList ls)
624624 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)
626626 let readSrc =
627627 Source.producer
628628 $ Producer.concat Producer.fromList A.producer