Closed chtenb closed 2 years ago
We can close https://github.com/purescript/purescript-strings/issues/155 once this PR gets merged
Nice, I will look at this.
Why is this a breaking change, besides changing the names of the record fields in
PosString
?
Because the Parser type has changed and it is part of the public API of this package. If people have written a parser in terms of this definition, their code will have to be adjusted. Or does that not qualify as a breaking change?
Because the Parser type has changed and it is part of the public API of this package.
Sure, that makes sense. But the only thing that has changed about the type of the Parser
is the record field names in PosString
, right?
If it were up to me, I think I would do the work you've already done, and then also
anyCodePoint :: Parser CodePoint
anyChar
will not always succeed, like here https://pursuit.purescript.org/packages/purescript-parsing/8.2.0/docs/Text.Parsing.Parser.String#v:anyCharBut the only thing that has changed about the type of the Parser is the record field names in PosString, right?
Yes
I'll make an issue for anyCodePoint
Proof of concept to fix #77. This change would be breaking because it changes the underlying representation.
indexOf
anyDigit
,anyLetter
and derivatives use the CodeUnit version ofanyChar
for speed