Skip to content

Add support for GHC 9.14#3182

Draft
rowanG077 wants to merge 17 commits into
masterfrom
add-ghc914
Draft

Add support for GHC 9.14#3182
rowanG077 wants to merge 17 commits into
masterfrom
add-ghc914

Conversation

@rowanG077
Copy link
Copy Markdown
Member

@rowanG077 rowanG077 commented Apr 10, 2026

Branched off from #2941

A ton of bounds relaxation are necessary.

  • Run Test suite and fix issues
  • Debug HLS problems
  • Smoke test clash-protocols
  • Write a changelog entry (see changelog/README.md)
  • Check copyright notices are up to date in edited files

@rowanG077 rowanG077 changed the title Add ghc914 Add support for GHC 9.12 Apr 10, 2026
@rowanG077 rowanG077 changed the title Add support for GHC 9.12 Add support for GHC 9.14 Apr 10, 2026
martijnbastiaan and others added 7 commits May 15, 2026 07:12
A primitive's 'name' field may now be either a single string (current
syntax, fully backwards-compatible) or a non-empty list of strings:

    - Primitive:
        name: ["GHC.Num.Integer.IS", "GHC.Internal.Bignum.Integer.IS"]
        primType: Constructor
        workInfo: Never

When a list is given, the same primitive body is registered in clash's
PrimMap once per name. This is meant to handle wired-in GHC symbols whose
host module changes across GHC versions (e.g. base 'GHC.Num.Integer.IS'
on GHC <= 9.12 vs ghc-internal 'GHC.Internal.Bignum.Integer.IS' on
GHC >= 9.14), without having to duplicate the entire YAML body in a
sibling file.

Implementation: a new newtype 'UnresolvedPrimitiveEntry' wraps a
NonEmpty UnresolvedPrimitive and has the multi-name FromJSON instance.
The loader ('resolvePrimitive') now decodes a list of entries and
flattens them. The 'Primitive' record itself still carries a single
'name :: !Text', so every downstream lookup, hash, and error message is
unchanged.

The existing 'FromJSON UnresolvedPrimitive' instance is kept for
backwards compatibility but rejects multi-name entries with a clear
error message.
Co-Authored-By: Martijn Bastiaan <martijn@qbaylogic.com>
Co-Authored-By: Martijn Bastiaan <martijn@qbaylogic.com>
Co-Authored-By: Martijn Bastiaan <martijn@qbaylogic.com>
Co-Authored-By: Martijn Bastiaan <martijn@qbaylogic.com>
rowanG077 and others added 2 commits May 15, 2026 07:26
Co-Authored-By: Martijn Bastiaan <martijn@qbaylogic.com>
@martijnbastiaan
Copy link
Copy Markdown
Member

martijnbastiaan commented May 15, 2026

@rowanG077 It's alive!

I've done the very opinionated thing of removing clash-term, which has been sitting unused in the repo for quite a while now (though I do feel it's a cool project). But AFAIK it didn't do anything except for introducing a bunch of allow-newers.. Should we just move it to a separate repo?

It has sat there unused for a long time
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