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

Use primitive instead of duplicating primop wrappers. #548

Closed
oberblastmeister opened this issue Sep 29, 2022 · 3 comments
Closed

Use primitive instead of duplicating primop wrappers. #548

oberblastmeister opened this issue Sep 29, 2022 · 3 comments

Comments

@oberblastmeister
Copy link

There are a lot of primop wrappers in Data.ByteString.Short.Internal that are already in primitive. Can we use primitive instead of duplicating this code? I think it would also be useful if type ShortByteString = ByteArray.

@sjakobi
Copy link
Member

sjakobi commented Sep 29, 2022

bytestring can't depend on primitive as long as primitive isn't a GHC boot library.

@clyring
Copy link
Member

clyring commented Oct 3, 2022

The duplication is a bit unfortunate but isn't causing any real pain. I would have no particular objection to primitive becoming a boot library so that bytestring and other boot libraries can depend on it, but unless that happens I don't think there is anything actionable here. I don't think this issue tracker is a good venue for further discussion on this topic; perhaps try asking around at the ghc-devs or libraries mailing lists if you wish to discuss this further.

(Regarding your type ShortByteString = ByteArray suggestion: I don't think this will ever happen; their instances do not agree perfectly. But a newtype wrapper is still up for discussion: see #410.)

@clyring clyring closed this as completed Oct 3, 2022
@Bodigrim
Copy link
Contributor

Bodigrim commented Oct 3, 2022

Given the amount of pain which being a boot library imposes, I would rather keep their list as short as possible.

That said, I intend to make progress with #410 before bytestring-0.12. Cf. haskell/text#474 and haskell/primitive#354.

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

4 participants