Should CustomType bounds be derivable from the type args? #1421
Closed
aborgna-q
started this conversation in
Specification
Replies: 1 comment
-
Nvm, this is already implemented for typedefs hugr/hugr-core/src/extension/type_def.rs Lines 14 to 23 in abd70c9 (it's just missing from the spec) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some Custom types may be able to specify stricter bounds for some type instantiations.
For example, a
List[T]
may beBound.Any
in general butBound.Copyable
ifT: Copyable
.Note that that cannot be assumed in general. We could for example define a custom type resembling a tuple
(qubit, T)
, in which case the type would always beBound.Any
independently ofT
.Should we have some mechanism to compute the bounds given on instantiation?
Beta Was this translation helpful? Give feedback.
All reactions