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

Fix unused argument warnings on writeToBiSignal# (copy #2822) #2824

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Oct 9, 2024

Any usage of writeToBiSignal would result in:

Warning: The Haskell implementation of primitive Clash.Signal.BiSignal.writeToBiSignal# isn't using argument #1, but the corresponding primitive blackbox does.
This can lead to incorrect HDL output because GHC can replace these arguments by an undefined value.

Warning: The Haskell implementation of primitive Clash.Signal.BiSignal.writeToBiSignal# isn't using argument #3, but the corresponding primitive blackbox does.
This can lead to incorrect HDL output because GHC can replace these arguments by an undefined value.

Warning: The Haskell implementation of primitive Clash.Signal.BiSignal.writeToBiSignal# isn't using argument #4, but the corresponding primitive blackbox does.
This can lead to incorrect HDL output because GHC can replace these arguments by an undefined value.

This fixes that with some bang patterns on writeToBiSignal#.

I was a little afraid this might result in loops in haskell simulation.
But I've tested the manually test all three Counter* tests in Haskell simulation both inside clashi, and when compiled to executables.

Still TODO:

  • Write a changelog entry (see changelog/README.md)
  • Check copyright notices are up to date in edited files

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

@leonschoorl leonschoorl enabled auto-merge (squash) October 9, 2024 11:58
@leonschoorl leonschoorl merged commit 1487755 into 1.8 Oct 9, 2024
17 checks passed
@leonschoorl leonschoorl deleted the mergify/copy/1.8/pr-2822 branch October 9, 2024 13:34
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