Closed BartAdv closed 7 years ago
Thank you!
I suspect the problem has something to do with cs
being used here:
https://github.com/ziman/lightyear/blob/master/Lightyear/Core.idr#L225
while pure
uses just the uncommitted us
:
https://github.com/ziman/lightyear/blob/master/Lightyear/Core.idr#L79
This means that as soon as you run getState
, the parser will commit for no reason.
I propose changing getState
to use us
. @jfdm, how does that sound?
Given parser:
following test code
should fail on left branch and succeed on second. However, this happens:
Now, if I remove the
getPosition
action:it succeeds: