@@ -1384,7 +1384,7 @@ manyTillP :: -- Monad m =>
13841384manyTillP _p1 _p2 _f = undefined
13851385 -- D.toParserK $ D.manyTillP (D.fromParserK p1) (D.fromParserK p2) f
13861386
1387−-- | @manyTill f test collect@ tries the parser @test@ on the input, if @test@
1387+-- | @manyTill collect test f@ tries the parser @test@ on the input, if @test@
13881388-- fails it backtracks and tries @collect@, after @collect@ succeeds @test@ is
13891389-- tried again and so on. The parser stops when @test@ succeeds. The output of
13901390-- @test@ is discarded and the output of @collect@ is accumulated by the
@@ -1397,8 +1397,8 @@ manyTillP _p1 _p2 _f = undefined
13971397{-# INLINE manyTill #-}
13981398manyTill :: Monad m
13991399 => Parser m a b -> Parser m a x -> Fold m b c -> Parser m a c
1400−manyTill p1 p2 f =
1401− D.toParserK $ D.manyTill f (D.fromParserK p1) (D.fromParserK p2)
1400+manyTill collect test f =
1401+ D.toParserK $ D.manyTill (D.fromParserK collect) (D.fromParserK test) f
14021402
14031403-- | @manyThen f collect recover@ repeats the parser @collect@ on the input and
14041404-- collects the output in the supplied fold. If the the parser @collect@ fails,