`posLineCols` fails for more than one `Pos`
TheMatten opened this issue · 1 comments
TheMatten commented
posLineCols
fails with
*** Exception: FlatParse.Basic.posLineCols: invalid position
on any input with more than one Pos
- problem seems to be with initial sorting assuming increasing, not decreasing values of Pos
:
flatparse/src/FlatParse/Basic.hs
Line 407 in 702a209
Instead, it should probably sort the opposite way, e.g. with Down
:
sorted = sortOn (Down . snd) (zip [0..] poss)
and such modified function seems to work fine on some test inputs.
AndrasKovacs commented
Fixed by ba96008. I also updated on Hackage.