You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
array_type(TypeArg::BoundedNat{n: n - 1}, elem_ty_var.clone());
These ops return an option type, one assumes that failure here means the array had zero size. As is this is unnecessary:
if they array's size is TypeArg::BoundedNat{n: 0}, compute_signature should return an error (instead of panicking on the line above).
if the array's size is a TypeArg::Variable we fail. We can't do better without arithmetic-in-the-type-system. Note this means that these pop functions are not useful inside functions polymorphic on the size of the array.
The text was updated successfully, but these errors were encountered:
I expect that currently we will get panics on
hugr/hugr-core/src/extension/prelude/array.rs
Line 69 in f3dafd7
These ops return an
option
type, one assumes that failure here means the array had zero size. As is this is unnecessary:TypeArg::BoundedNat{n: 0}
,compute_signature
should return an error (instead of panicking on the line above).TypeArg::Variable
we fail. We can't do better without arithmetic-in-the-type-system. Note this means that thesepop
functions are not useful inside functions polymorphic on the size of the array.The text was updated successfully, but these errors were encountered: