Implement stimes for Builder and ShortByteString #611
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I implemented
stimes
forBuilder
in #587 after being unpleasantly not-quite-surprised by the fact that it doesn't work with a multiplier of zero in the tests I wrote in that patch. But the change is unrelated, so I've broken it off into another pull request.We could also now newtype-derive
Semigroup
andMonoid
forShortByteString
with base-4.18 and newer, but I haven't done so yet because I'm undecided on whether that should be considered a breaking change for PVP purposes: It would change the types of errors we throw on overflow from our ownSizeOverflowException
to whateverData.Array.Byte
chooses to throw. (Error message quality is about the same in both cases, I think.)