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

ShortByteString's constructor is exported by Data.ByteString.Short but maybe shouldn't #545

Closed
sergv opened this issue Sep 22, 2022 · 2 comments

Comments

@sergv
Copy link
Contributor

sergv commented Sep 22, 2022

I was a bit surprised that constructor of ShortByteString, the one showing the unboxed byte array within, is exported by the non-internal module Data.ByteString.Short. For other bytestring types the modules strive to hide internals, especially if internals are not intended to be used directly. It seems that unboxed byte array shouldn't be inteded to be used by ShortByteString clients by default. Perhaps I'm missing something?

@clyring
Copy link
Member

clyring commented Sep 23, 2022

Exposing the constructor was intentional. See #313 for some brief discussion.

@sergv
Copy link
Contributor Author

sergv commented Sep 23, 2022

Makes sense, I'll close this one then.

@sergv sergv closed this as completed Sep 23, 2022
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

No branches or pull requests

2 participants