Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Word64 Unique on GHC 9.10+ (copy #2857) #2859

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Dec 30, 2024

This fixes a left-over from the GHC 9.10 upgrade where we kept Clash's Unique to be an Int, while GHC's Unique became a Word64 (see #2758)

Now there is no longer a possibility for overflow when converting a GHC Unique to a Clash Unique.

As part of this PR we copy the source from the package https://hackage.haskell.org/package/concurrent-supply and have it generate Clash Unique values instead of Int.


This is an automatic copy of pull request #2857 done by [Mergify](https://mergify.com).

@mergify mergify bot added the conflicts label Dec 30, 2024
Copy link
Author

mergify bot commented Dec 30, 2024

Cherry-pick of 1d0f840 has failed:

On branch mergify/copy/1.8/pr-2857
Your branch is up to date with 'origin/1.8'.

You are currently cherry-picking commit 1d0f8402.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   .ci/stack-9.2.yaml
	modified:   .ci/stack-9.4.yaml
	modified:   benchmark/benchmark-normalization.hs
	modified:   benchmark/clash-benchmark.cabal
	modified:   benchmark/common/BenchmarkCommon.hs
	modified:   benchmark/profiling/run/clash-profiling.cabal
	modified:   benchmark/profiling/run/profile-normalization-run.hs
	modified:   changelog/2024-07-26T07_36_58+02_00_ghc_910_upgrade
	modified:   clash-ghc/src-ghc/Clash/GHC/Evaluator.hs
	modified:   clash-ghc/src-ghc/Clash/GHC/Evaluator/Primitive.hs
	modified:   clash-ghc/src-ghc/Clash/GHC/GenerateBindings.hs
	modified:   clash-lib-hedgehog/src/Clash/Hedgehog/Unique.hs
	modified:   clash-lib/src/Clash/Core/Evaluator/Types.hs
	modified:   clash-lib/src/Clash/Core/FreeVars.hs
	modified:   clash-lib/src/Clash/Core/PartialEval.hs
	modified:   clash-lib/src/Clash/Core/PartialEval/Monad.hs
	modified:   clash-lib/src/Clash/Core/PartialEval/NormalForm.hs
	modified:   clash-lib/src/Clash/Core/Util.hs
	modified:   clash-lib/src/Clash/Core/VarEnv.hs
	modified:   clash-lib/src/Clash/Data/UniqMap.hs
	modified:   clash-lib/src/Clash/Driver.hs
	modified:   clash-lib/src/Clash/Netlist/Util.hs
	modified:   clash-lib/src/Clash/Normalize.hs
	modified:   clash-lib/src/Clash/Normalize/Transformations/DEC.hs
	modified:   clash-lib/src/Clash/Normalize/Transformations/MultiPrim.hs
	modified:   clash-lib/src/Clash/Normalize/Transformations/Specialize.hs
	modified:   clash-lib/src/Clash/Rewrite/Types.hs
	modified:   clash-lib/src/Clash/Rewrite/Util.hs
	modified:   clash-lib/src/Clash/Unique.hs
	modified:   clash-lib/src/Clash/Util.hs
	modified:   clash-lib/src/Clash/Util/Graph.hs
	new file:   clash-lib/src/Clash/Util/Supply.hs
	modified:   clash-lib/tests/Clash/Tests/Core/Subst.hs
	modified:   clash-lib/tests/Test/Clash/Rewrite.hs
	modified:   nix/overlay-ghc962.nix
	modified:   tests/clash-testsuite.cabal
	modified:   tests/src/Test/Tasty/Clash/CoreTest.hs
	modified:   tests/src/Test/Tasty/Clash/NetlistTest.hs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   clash-ghc/clash-ghc.cabal
	both modified:   clash-lib/clash-lib.cabal

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

This fixes a left-over from the GHC 9.10 upgrade where we kept
Clash's Unique to be an Int, while GHC's Unique became a Word64

See #2758

Now there is no longer a possibility for overflow when converting
a GHC Unique to a Clash Unique.

As part of this PR we copy the source from the package
https://hackage.haskell.org/package/concurrent-supply
and have it generate Clash Unique values instead of Int.

(cherry picked from commit 1d0f840)
@christiaanb christiaanb force-pushed the mergify/copy/1.8/pr-2857 branch from fb9e96f to 38889d9 Compare December 31, 2024 14:36
@christiaanb christiaanb merged commit 95bd1c6 into 1.8 Dec 31, 2024
17 checks passed
@christiaanb christiaanb deleted the mergify/copy/1.8/pr-2857 branch December 31, 2024 16:42
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.

1 participant