Skip to content

Implement sliceOfShortByteString - #724

Merged
Bodigrim merged 1 commit into
haskell:masterfrom
vdukhovni:sliceOfShortByteString
Nov 1, 2026
Merged

Bodigrim merged 1 commit into
haskell:masterfrom
vdukhovni:sliceOfShortByteString

Conversation

@vdukhovni

Copy link
Copy Markdown
Contributor

Fixes #664

@Bodigrim

Copy link
Copy Markdown
Contributor

@vdukhovni could you please rebase? I've fixed CI configuration.

@vdukhovni
vdukhovni force-pushed the sliceOfShortByteString branch from bd3a579 to b476790 Compare November 1, 2026 01:09
@Bodigrim
Bodigrim merged commit 35404dd into haskell:master Nov 1, 2026
26 checks passed
@Bodigrim

Bodigrim commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Thanks!

Comment on lines +1077 to +1078
| len >= 0 && off + len <= Sh.length sbs
= builder $ shortByteStringCopyStep sbs off len

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, for the late review, but I wonder if it might be good to check for negative offsets too?!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're perhaps right, that's an omission. A negative offset for some reason feels like a less likely error, but there's no science behind this. With the PR merged, the additional bounds check would be a new PR? Care to author it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #726

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a splice of ShortByteString builder

4 participants