-
Notifications
You must be signed in to change notification settings - Fork 141
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
Starting offset not necessary #174
Labels
Milestone
Comments
Update: I'm implementing this idea in https://github.com/ekmett/bytestring/tree/no-offset |
ekmett
added a commit
to ekmett/bytestring
that referenced
this issue
Jun 5, 2019
Addressed by #175. |
hvr
added
the
blocked: next-major-version-bump
blocked until a major version bump is happening
label
Dec 19, 2019
vdukhovni
pushed a commit
to vdukhovni/bytestring
that referenced
this issue
May 27, 2020
vdukhovni
pushed a commit
to vdukhovni/bytestring
that referenced
this issue
May 27, 2020
vdukhovni
pushed a commit
to vdukhovni/bytestring
that referenced
this issue
May 29, 2020
vdukhovni
pushed a commit
to vdukhovni/bytestring
that referenced
this issue
May 29, 2020
vdukhovni
pushed a commit
to vdukhovni/bytestring
that referenced
this issue
Jun 3, 2020
vdukhovni
pushed a commit
to vdukhovni/bytestring
that referenced
this issue
Jun 3, 2020
Closed
Bodigrim
removed
the
blocked: next-major-version-bump
blocked until a major version bump is happening
label
Sep 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GHC >= 8.2 exports
plusForeignPtr
, which allows you to switch the address targeted by aForeignPtr
. The finalizers remain attached. However, this appears to be implementable, by hand, using the public contents ofGHC.ForeignPtr
clear back to at least GHC 7.0!Removing the offset would save an entire word per bytestring!
It may be worth including a backwards compatibility shim on modern enough GHCs to support bidirectional pattern synonyms. This would enable most consumers that use the
Data.ByteString.Internal
module to proceed unpatched.e.g. something like
With sufficient rewrite rules for replacing
plusForeignPtr fp 0
withfp
it should give almost all of the benefits of a complete rewrite of user code.This would be a major version bump as the behavior of round-tripping through the pattern synonym would change.
I don't have any compilers older than GHC 7.0 to test with, so I'm not sure how much further back into antiquity this can be ported. The current lower bound on base for
bytestring
is set at GHC 6.12, so this doesn't appear to slide our compatibility window much if at all.The text was updated successfully, but these errors were encountered: