Skip to content

Conversation

@kleinreact
Copy link
Member

@kleinreact kleinreact commented Oct 24, 2025

The PR bumps ghc-typelits-natnormalise, ghc-typelits-knownnat, and ghc-typelits-extra to the latest versions and introduces some required code changes in clash-prelude to make it compile.

Still TODO:

Nice to have:

@DigitalBrains1
Copy link
Member

Could you also locally run a check with --prefer-oldest at least on our oldest supported GHC, to see that the older plugins also still allow the changed code to type-check?

@kleinreact
Copy link
Member Author

Could you also locally run a check with --prefer-oldest at least on our oldest supported GHC, to see that the older plugins also still allow the changed code to type-check?

Every build is currently failing due to warnings caused by clash-lang/ghc-typelits-natnormalise#105 (comment). I created another branch for just checking the changes to Clash.Sized.Vector: #3062.

ghc-typelits-extra >= 0.5.1 && < 0.6,
ghc-typelits-knownnat >= 0.8.2 && < 0.9,
ghc-typelits-natnormalise >= 0.9.1 && < 0.10,
-- <<<
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the new code in Vector.hs doesn't typecheck with the old version of the plugin(s), the lower bound increases should be permanant.
But possibly conditional on the GHC version.

@kleinreact kleinreact force-pushed the bump-typelit-plugins branch from f526cab to 865be36 Compare December 1, 2025 04:48
@christiaanb
Copy link
Member

christiaanb commented Dec 1, 2025

I’m adding some features and fixes in clash-lang/ghc-typelits-natnormalise#110 which will hopefully only require haddock/doctest changes w.r.t. error messages for clash-prelude.

@christiaanb
Copy link
Member

With the changes in clash-lang/ghc-typelits-natnormalise#110, the following is all that's needed to compile clash-prelude warning-free and pass the unit-tests and doctests: 9b4ca8a

@kleinreact kleinreact force-pushed the bump-typelit-plugins branch from 865be36 to 10d8484 Compare December 2, 2025 05:19
@DigitalBrains1
Copy link
Member

DigitalBrains1 commented Dec 2, 2025

[...] all that's needed to compile clash-prelude warning-free and pass the unit-tests and doctests: 9b4ca8a

I note you don't increase the lower bounds on the dependencies. So does it work with the whole range of versions in the interval then? I'm having trouble understanding how you fix a compilation error by merely allowing more versions of a dependency to be used...

[edit]
Oh! Wait, was the problem that only the new plugin version(s) caused an issue to begin with? If so, shouldn't we exclude ghc-typelits-natnormalise 0.9.1 specifically? Would that be enough for people not to construct a build plan that doesn't compile with -Werror and doesn't pass unit tests and doctests?
[/edit]

@christiaanb
Copy link
Member

christiaanb commented Dec 2, 2025

I have released version 0.9.3 of the natnormalise plugin, which requires no changes to any of our clash-* packages. See also c6f2ed3

@kleinreact kleinreact force-pushed the bump-typelit-plugins branch from 10d8484 to 7e907a9 Compare December 3, 2025 04:47
@kleinreact
Copy link
Member Author

I have released version 0.9.3 of the natnormalise plugin, which requires no changes to any of our clash-* packages.

That's great. Thanks.

I'd wait a bit more to also include the next ghc-typelits-extra release (due to the most recent features), and then this PR should be quite easy to land.

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.

CLog type family reduction

5 participants