diff --git a/hugr-core/src/types/serialize.rs b/hugr-core/src/types/serialize.rs index 9d7673184..2f1daf22c 100644 --- a/hugr-core/src/types/serialize.rs +++ b/hugr-core/src/types/serialize.rs @@ -5,7 +5,6 @@ use super::custom::CustomType; use crate::extension::prelude::{qb_t, usize_t}; use crate::extension::SignatureError; use crate::ops::AliasDecl; -use crate::std_extensions::collections::array::array_type; #[derive(serde::Serialize, serde::Deserialize, Clone, Debug)] #[serde(tag = "t")] @@ -14,7 +13,6 @@ pub(super) enum SerSimpleType { I, G(Box), Sum(SumType), - Array { inner: Box, len: u64 }, Opaque(CustomType), Alias(AliasDecl), V { i: usize, b: TypeBound }, @@ -51,9 +49,6 @@ impl TryFrom for TypeBase { SerSimpleType::I => usize_t().into_(), SerSimpleType::G(sig) => TypeBase::new_function(*sig), SerSimpleType::Sum(st) => st.into(), - SerSimpleType::Array { inner, len } => { - array_type(len, (*inner).try_into().unwrap()).into_() - } SerSimpleType::Opaque(o) => TypeBase::new_extension(o), SerSimpleType::Alias(a) => TypeBase::new_alias(a), SerSimpleType::V { i, b } => TypeBase::new_var_use(i, b), diff --git a/specification/schema/hugr_schema_live.json b/specification/schema/hugr_schema_live.json index 5df9aa9fb..8037e513d 100644 --- a/specification/schema/hugr_schema_live.json +++ b/specification/schema/hugr_schema_live.json @@ -92,34 +92,6 @@ "title": "AliasDefn", "type": "object" }, - "Array": { - "additionalProperties": true, - "description": "Known size array whose elements are of the same type.", - "properties": { - "t": { - "const": "Array", - "default": "Array", - "enum": [ - "Array" - ], - "title": "T", - "type": "string" - }, - "inner": { - "$ref": "#/$defs/Type" - }, - "len": { - "title": "Len", - "type": "integer" - } - }, - "required": [ - "inner", - "len" - ], - "title": "Array", - "type": "object" - }, "BoundedNatArg": { "additionalProperties": true, "properties": { @@ -1794,7 +1766,6 @@ "discriminator": { "mapping": { "Alias": "#/$defs/Alias", - "Array": "#/$defs/Array", "G": "#/$defs/FunctionType", "I": "#/$defs/USize", "Opaque": "#/$defs/Opaque", @@ -1821,9 +1792,6 @@ { "$ref": "#/$defs/FunctionType" }, - { - "$ref": "#/$defs/Array" - }, { "$ref": "#/$defs/SumType" }, diff --git a/specification/schema/hugr_schema_strict_live.json b/specification/schema/hugr_schema_strict_live.json index 9a28e6397..7d7b1342a 100644 --- a/specification/schema/hugr_schema_strict_live.json +++ b/specification/schema/hugr_schema_strict_live.json @@ -92,34 +92,6 @@ "title": "AliasDefn", "type": "object" }, - "Array": { - "additionalProperties": false, - "description": "Known size array whose elements are of the same type.", - "properties": { - "t": { - "const": "Array", - "default": "Array", - "enum": [ - "Array" - ], - "title": "T", - "type": "string" - }, - "inner": { - "$ref": "#/$defs/Type" - }, - "len": { - "title": "Len", - "type": "integer" - } - }, - "required": [ - "inner", - "len" - ], - "title": "Array", - "type": "object" - }, "BoundedNatArg": { "additionalProperties": false, "properties": { @@ -1794,7 +1766,6 @@ "discriminator": { "mapping": { "Alias": "#/$defs/Alias", - "Array": "#/$defs/Array", "G": "#/$defs/FunctionType", "I": "#/$defs/USize", "Opaque": "#/$defs/Opaque", @@ -1821,9 +1792,6 @@ { "$ref": "#/$defs/FunctionType" }, - { - "$ref": "#/$defs/Array" - }, { "$ref": "#/$defs/SumType" }, diff --git a/specification/schema/testing_hugr_schema_live.json b/specification/schema/testing_hugr_schema_live.json index c7e80644e..9e86bff7c 100644 --- a/specification/schema/testing_hugr_schema_live.json +++ b/specification/schema/testing_hugr_schema_live.json @@ -92,34 +92,6 @@ "title": "AliasDefn", "type": "object" }, - "Array": { - "additionalProperties": true, - "description": "Known size array whose elements are of the same type.", - "properties": { - "t": { - "const": "Array", - "default": "Array", - "enum": [ - "Array" - ], - "title": "T", - "type": "string" - }, - "inner": { - "$ref": "#/$defs/Type" - }, - "len": { - "title": "Len", - "type": "integer" - } - }, - "required": [ - "inner", - "len" - ], - "title": "Array", - "type": "object" - }, "BoundedNatArg": { "additionalProperties": true, "properties": { @@ -1872,7 +1844,6 @@ "discriminator": { "mapping": { "Alias": "#/$defs/Alias", - "Array": "#/$defs/Array", "G": "#/$defs/FunctionType", "I": "#/$defs/USize", "Opaque": "#/$defs/Opaque", @@ -1899,9 +1870,6 @@ { "$ref": "#/$defs/FunctionType" }, - { - "$ref": "#/$defs/Array" - }, { "$ref": "#/$defs/SumType" }, diff --git a/specification/schema/testing_hugr_schema_strict_live.json b/specification/schema/testing_hugr_schema_strict_live.json index 08e37e707..88ee9d4dd 100644 --- a/specification/schema/testing_hugr_schema_strict_live.json +++ b/specification/schema/testing_hugr_schema_strict_live.json @@ -92,34 +92,6 @@ "title": "AliasDefn", "type": "object" }, - "Array": { - "additionalProperties": false, - "description": "Known size array whose elements are of the same type.", - "properties": { - "t": { - "const": "Array", - "default": "Array", - "enum": [ - "Array" - ], - "title": "T", - "type": "string" - }, - "inner": { - "$ref": "#/$defs/Type" - }, - "len": { - "title": "Len", - "type": "integer" - } - }, - "required": [ - "inner", - "len" - ], - "title": "Array", - "type": "object" - }, "BoundedNatArg": { "additionalProperties": false, "properties": { @@ -1872,7 +1844,6 @@ "discriminator": { "mapping": { "Alias": "#/$defs/Alias", - "Array": "#/$defs/Array", "G": "#/$defs/FunctionType", "I": "#/$defs/USize", "Opaque": "#/$defs/Opaque", @@ -1899,9 +1870,6 @@ { "$ref": "#/$defs/FunctionType" }, - { - "$ref": "#/$defs/Array" - }, { "$ref": "#/$defs/SumType" },