elm-community / parser-combinators

A parser combinator library for Elm.
http://package.elm-lang.org/packages/elm-community/parser-combinators/latest
BSD 3-Clause "New" or "Revised" License
104 stars 13 forks source link

`many` does not halt on successful but unaffected contexts #8

Closed freakingawesome closed 8 years ago

freakingawesome commented 8 years ago

Some parsers, like while or many can return Ok without consuming any input. When such a parser is used as the input to many, the program will fail to halt. Here is a contrived example that will not halt:

parse (many <| while ((/=) 'c')) "abc"
Bogdanp commented 8 years ago

Thanks for reporting and fixing the issue! :)

I've published version 2.0.1 of the package with your fix.