xls
xls copied to clipboard
[enhancement] parametric support for type aliases
What's hard to do? (limit 100 words)
Currently you can really do things like:
type Index<N: u32> = uN[std::clog2(u32) + u32:1];
or
struct SomeDataChunk<N: u32> {
type Index = uN[std::clog2(u32) + u32:1],
data: u32[N],
index_start: Index,
index_end: Index,
}
Current best alternative workaround (limit 100 words)
Hardcode the type or duplicate the type expression everywhere it's being used.
Your view of the "best case XLS enhancement" (limit 100 words)
Add support for arbitrary parameterized type alias in all context:
- struct body
- proc body
- parametric definition