Drop support for GHCs older than 9.2?
- Dominant language
- Haskell
- Stars
- 123
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
The PR at https://github.com/haskell/primitive/pull/445 fixes a calling convention mistake that impacts riscv64. While reviewing the PR, I was reminded of the dreadful shims and compatibility code that keeps this library working with older GHCs. What I mean specifically is that, before GHC 9.2 (which ships with base 4.16), `Word16` was defined like this:
data Word16 = W16# Word#
And in GHC 9.2, it was changed to this:
data Word16 = W16# Word16#
I would like to just drop support for the old construction of `Word16` (and other word types) entirely. I'm sure that, as a minor additional benefit, there are a few other miscellaneous primops that become available in ghc-prim that we could stop shimming out, but the main thing I am interested in is getting rid of support for legacy `Word8/16/32/64` data constructors.
The cost of continuing to support these old GHC releases is that the code in the library is harder to read and understand. The benefit of continuing to support these old GHC releases is that people can keep using new versions of `primitive` will old compilers. I suspect that a critical mass of the Haskell-library ecosystems has probably moved on so that, even if `primitive` were to support old GHC releases, it would still be, in practice, unlikely that most people could use an old GHC. For example, new releases of the `time` library required base 4.19 or newer (GHC 9.8).
My own opinion is that it would be better to drop support for these old GHCs. But I feel this way because I have not used GHC 9.0 or the GHC 8.x series in a long time. I would like to gather feedback from any interested party. I would also like to solicit the CLC's opinion on such a change if anyone on the committee would care to weigh in on this.
Contributor guide
No contributing guide indexed for this repository
Research direction
Review PR #445 and the existing compatibility shims for pre-GHC 9.2 Word8/16/32/64 constructors. Gather feedback from affected users and the CLC, then determine whether dropping support for GHC 9.0 and older is acceptable; done means reaching a documented project decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100