Currently shape of a Tensor is tensor of shape, and shape of scalar is unit. This is nice and consistent, but depends on codegen to make Tensor D (Tuple) efficient. That's not super-onerous, but it is more stuff in the runtime, and would complicate the cost model. And alternative might be to simply define (shape t: tensor of scalar) = (size t).
Currently shape of a Tensor is tensor of shape, and shape of scalar is unit. This is nice and consistent, but depends on codegen to make
Tensor D (Tuple)
efficient. That's not super-onerous, but it is more stuff in the runtime, and would complicate the cost model. And alternative might be to simply define(shape t: tensor of scalar) = (size t)
.