You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so then we can track both the lines-based and offset-based positions.
From an API perspective, it is too easy for a library user to construct this Position with an invalid state.
On the other hand, it was already easy for the library user to construct an invalid state, since for each line
of input, a different range of columns is valid.
Thanks for opening this issue @jamesdbrock. I’m not personally familiar with the background behind why this library starts at 1, so I’m going to defer to other maintainers on that. But just wanted to let you know this was seen!
Position line and column should start at 0, not 1.
purescript-parsing/src/Text/Parsing/Parser/Pos.purs
Line 26 in f8dae05
This has been super inconvenient for me on several occasions.
https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html
This would be an easy change to make, but the hard part would be not breaking downstream dependents.
The text was updated successfully, but these errors were encountered: