diff --git a/hugr/src/types/type_param.rs b/hugr/src/types/type_param.rs index ffe0f6166..cb24c3a4d 100644 --- a/hugr/src/types/type_param.rs +++ b/hugr/src/types/type_param.rs @@ -136,6 +136,30 @@ impl From for TypeArg { } } +impl From for TypeArg { + fn from(arg: CustomTypeArg) -> Self { + Self::Opaque { arg } + } +} + +impl From for TypeArg { + fn from(v: TypeArgVariable) -> Self { + Self::Variable { v } + } +} + +impl From for TypeArg { + fn from(es: ExtensionSet) -> Self { + Self::Extensions { es } + } +} + +impl From> for TypeArg { + fn from(elems: Vec) -> Self { + Self::Sequence { elems } + } +} + /// A statically-known argument value to an operation. #[derive(Clone, Debug, PartialEq, Eq, serde::Deserialize, serde::Serialize)] #[non_exhaustive]