Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose ShortByteString construstor #313

Merged
merged 1 commit into from
Oct 30, 2020
Merged

Conversation

Bodigrim
Copy link
Contributor

After #305 there remain no reasons to hide SBS constructor into an Internal module: there is no internal invariant left which could possibly violated by its exposure.

This allows users to implement byteArrayToByteString and byteStringToByteArray from #186 without reaching out for internal modules. Cf. #253.

@Bodigrim Bodigrim requested a review from sjakobi October 25, 2020 13:27
Copy link
Member

@sjakobi sjakobi left a comment

Choose a reason for hiding this comment

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

Is there any chance that we might want to change ShortByteString's internal representation?! In that case we could save ourselves some hassle by keeping the constructor internal.

With this change, we can save our users some hassle though, so 👍.

@Bodigrim
Copy link
Contributor Author

Data.ByteString.Short.Internal is public (sigh), so changing the internal representation of ShortByteString would be a hassle anyways. However, I do not expect it happening any time soon: there is not much choice for unpinned, GC-managed memory other than ByteArray.

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.

None yet

2 participants