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

[enhancement][DSLX] Support ..= inclusive range so pattern matches can use inclusive max value #1904

Open
cdleary opened this issue Feb 3, 2025 · 0 comments
Labels
dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request

Comments

@cdleary
Copy link
Collaborator

cdleary commented Feb 3, 2025

What's hard to do? (limit 100 words)

Right now you can't do a pattern easily like: s8:0..s8:127 => with an inclusive maximum value for a type because the 127 is excluded and the type is incapable of expression 128. Rust has ..= to help with this.

Current best alternative workaround (limit 100 words)

Add another pattern to match arm with | like s8:0..s8:127 | s8:127 =>

Your view of the "best case XLS enhancement" (limit 100 words)

We add ..= support to pattern ranges as well.

@cdleary cdleary added dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant