[enhancement] DSLX should support "where" clauses to get parametric derived expression out of parametric position #1404
Labels
dslx
DSLX (domain specific language) implementation / front-end
enhancement
New feature or request
long-term-enhancement
Issues that are sensible enhancements but XLS devs expect may not be addressed in the near-term
What's hard to do? (limit 100 words)
This is more of a syntactic nicety so marking as long-term-enhancement, but wanted to file so I had an issue to point people at. For a signature like:
Ideally we'd be able to specify the output bit count outside the parameter list when it's really just inferred from the input side parameters; something like:
Current best alternative workaround (limit 100 words)
Just putting the "derived" parametric expression in the normal parametric list, as shown in the first snippet.
Your view of the "best case XLS enhancement" (limit 100 words)
The where clauses could help us make the function signatures a little more readable by getting the derived things more out of the way. It would be nice if we implemented them, Rust has a similar facility for getting type trait bounds out of the main signature; i.e. https://doc.rust-lang.org/rust-by-example/generics/where.html
The text was updated successfully, but these errors were encountered: