ziman / lightyear

Parser combinators for Idris
Other
238 stars 43 forks source link

Can ntimes be tail recursive? #65

Open Dretch opened 6 years ago

Dretch commented 6 years ago

Right now ntimes (https://github.com/ziman/lightyear/blob/master/Lightyear/Combinators.idr#L50) is not tail recursive, so it causes a stack overflow with large input.

Can this be made tail-recursive to avoid the problem?

Other combinators could also be changed - many, sepBy1, etc.

If this feature is desired I can put together a pull request?