AndrasKovacs/flatparse

`Ord` instance of `Pos`

pedrominicz opened this issue · 1 comments

The instance Ord Pos is compares positions as if they were integers, but positions get smaller further into the string! This quirk causes FlatParse.Examples.BasicLambda.Lexer.merge to prioritize "outer" errors instead of "inner" ones. The same happens here.

I am not sure if it is better to change the Ord instance or just change the example.

Thanks. The error merging was indeed just buggy. I flipped the Ord instance, that's the direction that really makes sense. Issue #40 also happened because of me mixing up the Ord direction. Addressed by eb98fcc. I updated the hackage version as well.