Skip to content

Conversation

@Ericson2314
Copy link
Contributor

@Ericson2314 Ericson2314 commented Dec 1, 2020

This is a companion to https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4492.

I'm not sure why the second-to-top commit isn't already merged, as ghc HEAD relies on it.

CC @bgamari

@bgamari
Copy link
Collaborator

bgamari commented Dec 14, 2020

@Ericson2314, this was an oversight on my part; thanks for doing this!

Can we get this merged, @kolmodin?

@Ericson2314
Copy link
Contributor Author

https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4492 is now just blocked on upstream libraries approving these PRs. (The current rebuild as I write this is just from me changing the a changeg log message.)

@Ericson2314
Copy link
Contributor Author

According to haskell/bytestring#326 these manual unboxed shifts for static shit amounts are no longer needed at all.

See
https://hackage.haskell.org/package/base-4.5.0.0/docs/Data-Bits.html#v:unsafeShiftL.
in binary's minimum supportedbase version.

Beyond reducing duplicated code, this will avoid CPP in dealing with the
changing primop situation for GHC 9.2.
@Ericson2314 Ericson2314 force-pushed the wip/no-extend-narrow-primop-names branch from 51ce49d to 1c07fd5 Compare January 30, 2021 21:52
@Ericson2314
Copy link
Contributor Author

And even better, base within the version range supported, always provides the very unsafe shifts we want!

@Ericson2314 Ericson2314 changed the title Use new primops names for converting numbers to and from the native size Use unsafe shifts from base rather than hand-rolling Feb 3, 2021
@Ericson2314
Copy link
Contributor Author

@kolmodin Can we merge this? It no longer makes any assumptions about the state of 9.2. As you can see in the description of https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4492, some of the others have gotten merged.

@bgamari
Copy link
Collaborator

bgamari commented Feb 21, 2021

Pinging @kolmodin?

@bgamari
Copy link
Collaborator

bgamari commented Mar 2, 2021

Looks good. The base bound is already >= 4.5.0.0 so it looks like this is good to go.

@bgamari bgamari merged commit 5f82649 into haskell:master Mar 2, 2021
@Ericson2314 Ericson2314 deleted the wip/no-extend-narrow-primop-names branch March 2, 2021 03:24
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.

2 participants