composewell / streamly

High performance, concurrent functional programming abstractions
https://streamly.composewell.com
Other
856 stars 64 forks source link

Recursive direct style Parser hangs #2601

Closed adithyaov closed 9 months ago

adithyaov commented 10 months ago

The following hangs on the input "ABC",

test :: Monad m => Parser Char m String
test =
    (Parser.oneEq '(' *> test <* Parser.oneEq ')')
          <|> Parser.fromFold Fold.toList

Whereas the same example with ParserK works.

harendra-kumar commented 9 months ago

Direct style parsers may not work recursively. Need to investigate for doc updation.

harendra-kumar commented 9 months ago

docs are updated.