Skip to content

Drop support for GHCs older than 9.2? #446

Open

Description

@andrewthad

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.

Activity

  1. TeofilC commented on Sep 7, 2026

    @TeofilC
    Member

    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.

    Any thoughts? @velveteer @Daniel-Diaz @ChickenProp @noughtmare @mpscholten @parsonsmatt @jeltsch @rickowens

  2. jeltsch commented on Sep 7, 2026

    @jeltsch

    This proposal sounds very sensible to me.

  3. konsumlamm commented on Sep 8, 2026

    @konsumlamm
    Contributor

    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.

  4. parsonsmatt commented on Sep 10, 2026

    @parsonsmatt
    Contributor

    I'm in favor. If you're using GHC 8.10 at this point, you've accepted the maintenance liability of unsupported software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions