tonymorris/fp-course

Exeption: Stack overflow with Parser.list (or list1)

ahaxu opened this issue · 0 comments

ahaxu commented

Current implementation of Parse.list (list1) https://github.com/tonymorris/fp-course/blob/master/src/Course/Parser.hs#L312-L337

Exception when running this parse (list1 (valueParser 'v')) "abc"

>> parse (list1 (character *> valueParser 'v')) "abc"
Result >< "vvv"

>> parse (list1 (valueParser 'v')) "abc"
*** Exception: stack overflow