xls
xls copied to clipboard
[enhancement][dslx] Add ability to refer to proc-scoped type aliases outside the proc
What's hard to do? (limit 100 words)
With #1050 we'll add the ability to have a locally scoped typedef for a proc, but that binding can't be referred to from an external scope. That would be another desirable feature (though the most major pain point is addressed with local type aliases, we believe).
Current best alternative workaround (limit 100 words)
Use more module-scoped type aliases (as we do before proc-scoped type aliases land).
Your view of the "best case XLS enhancement" (limit 100 words)
Something along the lines of:
proc P<N: u32> {
type MyType = uN[N];
}
proc Q {
...
next() {
let x = P<u32:42>::MyType:42;
}
}
Note that there's not a way to "hold on" to a spawned proc handle right now, the spawning is "ephemeral" in the sense it doesn't have a thing to refer to as a result. If spawning a proc gave back a handle of some sort it could be used as the basis for referring to instantiated properties of it.