The PR at #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:
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.
The PR at #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),
Word16was defined like this:And in GHC 9.2, it was changed to this:
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 legacyWord8/16/32/64data 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
primitivewill old compilers. I suspect that a critical mass of the Haskell-library ecosystems has probably moved on so that, even ifprimitivewere 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 thetimelibrary 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.