@@ -182,7 +182,7 @@ take :: Property
182182take =
183183 forAll (chooseInt (min_value, max_value)) $ \n ->
184184 forAll (listOf (chooseInt (min_value, max_value))) $ \ls ->
185− case S.parseD (P.fromFold $ FL.ltake n FL.toList) (S.fromList ls) of
185+ case S.parseD (P.fromFold $ FL.takeLE n FL.toList) (S.fromList ls) of
186186 Right parsed_list -> checkListEqual parsed_list (Prelude.take n ls)
187187 Left _ -> property False
188188
@@ -263,7 +263,7 @@ lookAheadPass :: Property
263263lookAheadPass =
264264 forAll (chooseInt (min_value, max_value)) $ \n ->
265265 let
266− takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.ltake n FL.toList
266+ takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.takeLE n FL.toList
267267 parseTwice = do
268268 parsed_list_1 <- takeWithoutConsume
269269 parsed_list_2 <- takeWithoutConsume
@@ -279,7 +279,7 @@ lookAhead :: Property
279279lookAhead =
280280 forAll (chooseInt (min_value, max_value)) $ \n ->
281281 let
282− takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.ltake n FL.toList
282+ takeWithoutConsume = P.lookAhead $ P.fromFold $ FL.takeLE n FL.toList
283283 parseTwice = do
284284 parsed_list_1 <- takeWithoutConsume
285285 parsed_list_2 <- takeWithoutConsume
@@ -396,7 +396,7 @@ teeWithPass =
396396 forAll (chooseInt (min_value, max_value)) $ \n ->
397397 forAll (listOf (chooseInt (0, 1))) $ \ls ->
398398 let
399− prsr = P.fromFold $ FL.ltake n FL.toList
399+ prsr = P.fromFold $ FL.takeLE n FL.toList
400400 in
401401 case S.parseD (P.teeWith (,) prsr prsr) (S.fromList ls) of
402402 Right (ls_1, ls_2) -> checkListEqual (Prelude.take n ls) ls_1 .&&. checkListEqual ls_1 ls_2
@@ -536,8 +536,8 @@ applicative =
536536 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
537537 let parser =
538538 (,)
539− <$> P.fromFold (FL.ltake (length list1) FL.toList)
540− <*> P.fromFold (FL.ltake (length list2) FL.toList)
539+ <$> P.fromFold (FL.takeLE (length list1) FL.toList)
540+ <*> P.fromFold (FL.takeLE (length list2) FL.toList)
541541 in monadicIO $ do
542542 (olist1, olist2) <-
543543 run $ S.parseD parser (S.fromList $ list1 ++ list2)
@@ -547,7 +547,7 @@ applicative =
547547sequence :: Property
548548sequence =
549549 forAll (vectorOf 11 (listOf (chooseAny :: Gen Int))) $ \ ins ->
550− let parsers = fmap (\xs -> P.fromFold $ FL.ltake (length xs) FL.toList) ins
550+ let parsers = fmap (\xs -> P.fromFold $ FL.takeLE (length xs) FL.toList) ins
551551 in monadicIO $ do
552552 outs <- run $
553553 S.parseD
@@ -560,8 +560,8 @@ monad =
560560 forAll (listOf (chooseAny :: Gen Int)) $ \ list1 ->
561561 forAll (listOf (chooseAny :: Gen Int)) $ \ list2 ->
562562 let parser = do
563− olist1 <- P.fromFold (FL.ltake (length list1) FL.toList)
564− olist2 <- P.fromFold (FL.ltake (length list2) FL.toList)
563+ olist1 <- P.fromFold (FL.takeLE (length list1) FL.toList)
564+ olist2 <- P.fromFold (FL.takeLE (length list2) FL.toList)
565565 return (olist1, olist2)
566566 in monadicIO $ do
567567 (olist1, olist2) <-
@@ -582,7 +582,7 @@ parseMany =
582582 ( run
583583 $ S.toList
584584 $ S.parseManyD
585− (P.fromFold $ FL.ltake len FL.toList) (S.fromList $ concat ins)
585+ (P.fromFold $ FL.takeLE len FL.toList) (S.fromList $ concat ins)
586586 )
587587 listEquals (==) outs ins
588588