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

Respect VWord/VSeq invariants in parmap implementation #1579

Merged
merged 1 commit into from
Oct 10, 2023
Merged

Conversation

RyanGlScott
Copy link
Contributor

@RyanGlScott RyanGlScott commented Oct 9, 2023

Previously, parmap could incorrectly return a VWord when the element type was not Bit, and it could also return a VSeq when the element type was Bit. This changes the implementation of parmap to use the mkSeq smart constructor, which properly chooses what sort of GenValue to return depending on the element type.

Fixes #1578.

@RyanGlScott RyanGlScott requested review from yav and qsctr October 9, 2023 12:34
@RyanGlScott RyanGlScott temporarily deployed to github-pages October 9, 2023 12:35 — with GitHub Actions Inactive
@RyanGlScott RyanGlScott self-assigned this Oct 9, 2023
Previously, `parmap` could incorrectly return a `VWord` when the element type
was not `Bit`, and it could also return a `VSeq` when the element type was
`Bit`. This changes the implementation of `parmap` to use the `mkSeq` smart
constructor, which properly chooses what sort of `GenValue` to return depending
on the element type.

Fixes #1578.
Copy link
Contributor

@qsctr qsctr left a comment

Choose a reason for hiding this comment

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

Looks good to me, did you mean fixes #1578 instead of #1437?

@RyanGlScott
Copy link
Contributor Author

did you mean fixes #1578 instead of #1437?

Oops, I had caught that mistake in the commit message, but not the PR description. I've now fixed the latter.

@RyanGlScott RyanGlScott merged commit ed40d6f into master Oct 10, 2023
43 checks passed
@RyanGlScott RyanGlScott deleted the T1578 branch October 10, 2023 11:44
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.

Use of parmap results in "not a word" error
2 participants