You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
Making the oldest supported GHC version 9.2 is quite a huge step from the current 8.2, so I'm a bit wary. According to the State of Haskell 2025 survey, 13.61% still use a GHC version older than 9.2. However, those can of course still use older versions of primitive. Getting rid of the old constructors is a compelling argument. I'm interested to see what others think.
Activity
TeofilC commentedon Sep 7, 2026
Any thoughts? @velveteer @Daniel-Diaz @ChickenProp @noughtmare @mpscholten @parsonsmatt @jeltsch @rickowens
jeltsch commentedon Sep 7, 2026
This proposal sounds very sensible to me.
konsumlamm commentedon Sep 8, 2026
Making the oldest supported GHC version 9.2 is quite a huge step from the current 8.2, so I'm a bit wary. According to the State of Haskell 2025 survey, 13.61% still use a GHC version older than 9.2. However, those can of course still use older versions of
primitive. Getting rid of the old constructors is a compelling argument. I'm interested to see what others think.parsonsmatt commentedon Sep 10, 2026
I'm in favor. If you're using GHC 8.10 at this point, you've accepted the maintenance liability of unsupported software.