Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Row Variables, the hard (but good?) way #903

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
7b242ac
Refactor: break out fn valid_row for validating a TypeRow
acl-cqc Jan 10, 2024
ba05010
Type::{validate,substitute}_in_row, {Substitution,SubstValues}::apply…
acl-cqc Jan 10, 2024
59c5854
[test] types.rs::construct - also validate
acl-cqc Jan 12, 2024
72b4fb2
[tests] poly_func.rs: test row variables
acl-cqc Jan 12, 2024
2cf1e7f
[test] validate Hugr passing around Function of unknown arity
acl-cqc Jan 12, 2024
8899806
[tests]Validation prevents row variables being used in node signatures
acl-cqc Jan 12, 2024
e1f1825
Simplify default apply_typevar_in_row
acl-cqc Jan 12, 2024
1074093
Separate TypeEnum::RowVariable
acl-cqc Jan 12, 2024
6c9685b
WIP TypeRowV contains enum RowVarOrType
acl-cqc Jan 25, 2024
37e671e
Merge remote-tracking branch 'origin/main' into feat/row_typevar2
acl-cqc Mar 26, 2024
bb87489
Add a test of a Call to a polymorphic function...failing validation!
acl-cqc Mar 27, 2024
cb1d47d
Fix: store functiontype + type_args in Call
acl-cqc Mar 27, 2024
ee7df6f
Clarify docs of CallIndirect
acl-cqc Mar 27, 2024
d6cefd6
Merge branch 'fix/polymorphic_call' into HEAD
acl-cqc Mar 27, 2024
38d68c0
WIP
acl-cqc Mar 26, 2024
98806a4
Go via IntoIterator??
acl-cqc Mar 26, 2024
81c63d9
WIP2
acl-cqc Mar 26, 2024
efa84e2
Separate impl From for TypeRow/TypeRowV
acl-cqc Mar 26, 2024
b205525
impl IntoIter for TypeRow (=> RowVarOrType's)
acl-cqc Mar 26, 2024
eee4e29
type.rs: don't publicise EMPTY_VL_TYPE_ROW - new() is const. (TODO sa…
acl-cqc Mar 26, 2024
7d71155
signature.rs: add Signature = fixed-len, FunctionType is var-length
acl-cqc Mar 26, 2024
97e6fd8
WIP
acl-cqc Mar 26, 2024
ef977ff
signature() methods return Signature
acl-cqc Mar 26, 2024
aeb0d2f
Remove TryFrom (fixup earlier)
acl-cqc Mar 27, 2024
63e9c97
PolyFuncType impls From<Signature>; add some Into/TryInto
acl-cqc Mar 26, 2024
1dbd1ca
fix apply_rowvar
acl-cqc Mar 26, 2024
0945913
More Signature stuff
acl-cqc Mar 26, 2024
5274103
Manually implement Default for FuncTypeBase - can we revert this later??
acl-cqc Mar 26, 2024
406a656
Generalize Type::new_sum
acl-cqc Mar 26, 2024
84a7a76
new_endo(vec![]) and similar empty types -> default()
acl-cqc Mar 26, 2024
bf6bb1d
More FunctionType -> Signature (op_def.rs)
acl-cqc Mar 26, 2024
c4ce0e8
check.rs: fix SumType using TryInto
acl-cqc Mar 26, 2024
6e1059a
views.rs FunctionType -> Signature
acl-cqc Mar 26, 2024
b06b1f2
FunctionType -> Signature in builder (adding fix_sig)
acl-cqc Mar 27, 2024
28cbbbc
Many more FunctionType->Signatures
acl-cqc Mar 26, 2024
a1c2992
serialization via try_into
acl-cqc Mar 27, 2024
8277c7f
collections.rs update
acl-cqc Mar 27, 2024
fe4f84c
WIP len??
acl-cqc Mar 27, 2024
e2a7e48
conversions: more RowVarOrType::, no Type::new_row_var, + TypeRowBase…
acl-cqc Mar 27, 2024
dde4795
More test updates
acl-cqc Mar 27, 2024
9bb09bd
fix declarative/signature.rs
acl-cqc Mar 27, 2024
57c2163
Split PolyFixedFunc off PolyFuncType, use for functions + Call
acl-cqc Mar 27, 2024
446640d
Add trait TypeRowElem w/ subst_row, validate - maybe in wrong place
acl-cqc Mar 27, 2024
699e44b
Fix row variables - var cannot range over unknown #variants of a Sum …
acl-cqc Apr 2, 2024
63a0b99
Rename: TypeRowV -> TypeRowVarLen
acl-cqc Apr 2, 2024
c987ed5
Rename: FunctionType -> FuncTypeVarLen
acl-cqc Apr 2, 2024
4a35720
Rename: Signature -> FunctionType
acl-cqc Apr 2, 2024
57a71b0
Rename: PolyFuncType -> PolyFuncVarLen; doc
acl-cqc Apr 2, 2024
c36780e
Rename: PolyFixedFunc -> PolyFuncType (consistent, but seems misleadi…
acl-cqc Apr 2, 2024
69f8b60
WIP Merge remote-tracking branch 'origin/main' into feat/row_typevar2
acl-cqc Apr 10, 2024
28aa2f0
Try to fix, revert define_function change. 2 serialization tests fail
acl-cqc Apr 10, 2024
87f276c
fix serialization
acl-cqc Apr 10, 2024
73617c4
Fix (revert?) doctests
acl-cqc Apr 10, 2024
ac9b887
Drop unnecessary TypeRow -> Cow
acl-cqc Apr 10, 2024
4f8b2be
Fix some warnings. Visibility problem with subst_row
acl-cqc Apr 10, 2024
a2e2919
Faff with visibility, add some private_bounds
acl-cqc Apr 10, 2024
5eb8811
Turn off some bad clippy warnings
acl-cqc Apr 10, 2024
c7c986f
Fix doclinks
acl-cqc Apr 10, 2024
eae3d5e
fmt
acl-cqc Apr 10, 2024
34bd13b
Fix --all-features by reverting FuncTypeVarLen back to FunctionType
acl-cqc Apr 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hugr/benches/benchmarks/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![allow(clippy::unit_arg)]
use hugr::extension::prelude::{QB_T, USIZE_T};
use hugr::ops::AliasDecl;
use hugr::types::{FunctionType, Type, TypeBound};
use hugr::types::{FuncTypeVarLen, Type, TypeBound};

use criterion::{black_box, criterion_group, AxisScale, Criterion, PlotConfiguration};

Expand All @@ -13,8 +13,8 @@ fn make_complex_type() -> Type {
let q_register = Type::new_tuple(vec![qb; 8]);
let b_register = Type::new_tuple(vec![int; 8]);
let q_alias = Type::new_alias(AliasDecl::new("QReg", TypeBound::Any));
let sum = Type::new_sum([vec![q_register].into(), vec![q_alias].into()]);
Type::new_function(FunctionType::new(vec![sum], vec![b_register]))
let sum = Type::new_sum([vec![q_register], vec![q_alias]]);
Type::new_function(FuncTypeVarLen::new(vec![sum], vec![b_register]))
}

fn bench_construction(c: &mut Criterion) {
Expand Down
7 changes: 3 additions & 4 deletions hugr/src/algorithm/const_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::collections::{BTreeSet, HashMap};

use itertools::Itertools;

use crate::types::SumType;
use crate::types::{FunctionType, SumType};
use crate::{
builder::{DFGBuilder, Dataflow, DataflowHugr},
extension::{ConstFoldResult, ExtensionRegistry},
Expand All @@ -14,9 +14,7 @@ use crate::{
HugrMut,
},
ops::{Const, LeafOp},
type_row,
types::FunctionType,
Hugr, HugrView, IncomingPort, Node, SimpleReplacement,
type_row, Hugr, HugrView, IncomingPort, Node, SimpleReplacement,
};

/// Tag some output constants with [`OutgoingPort`] inferred from the ordering.
Expand Down Expand Up @@ -221,6 +219,7 @@ mod test {
use crate::std_extensions::arithmetic::float_types::{ConstF64, FLOAT64_TYPE};
use crate::std_extensions::arithmetic::int_types::{ConstIntU, INT_TYPES};
use crate::std_extensions::logic::{self, NaryLogic};
use crate::types::FunctionType;

use rstest::rstest;

Expand Down
3 changes: 3 additions & 0 deletions hugr/src/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ pub enum SignatureError {
/// Invalid type arguments
#[error("Invalid type arguments for operation")]
InvalidTypeArgs,
/// Signature contains row variables i.e. is of unknown length
#[error("Signature contains variable {idx} which is a row of unknown length of {bound} types")]
ContainsRowVars { idx: usize, bound: TypeBound },
/// The Extension Registry did not contain an Extension referenced by the Signature
#[error("Extension '{0}' not found")]
ExtensionNotFound(ExtensionId),
Expand Down
9 changes: 5 additions & 4 deletions hugr/src/extension/declarative/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ use smol_str::SmolStr;
use crate::extension::prelude::PRELUDE_ID;
use crate::extension::{CustomValidator, ExtensionSet, SignatureFunc, TypeDef, TypeParametrised};
use crate::types::type_param::TypeParam;
use crate::types::{CustomType, FunctionType, PolyFuncType, Type, TypeRow};
use crate::types::type_row::TypeRowVarLen;
use crate::types::{CustomType, FuncTypeVarLen, PolyFuncVarLen, Type};
use crate::Extension;

use super::{DeclarationContext, ExtensionDeclarationError};
Expand All @@ -41,7 +42,7 @@ impl SignatureDeclaration {
op_params: &[TypeParam],
) -> Result<SignatureFunc, ExtensionDeclarationError> {
let make_type_row =
|v: &[SignaturePortDeclaration]| -> Result<TypeRow, ExtensionDeclarationError> {
|v: &[SignaturePortDeclaration]| -> Result<TypeRowVarLen, ExtensionDeclarationError> {
let types = v
.iter()
.map(|port_decl| port_decl.make_types(ext, ctx, op_params))
Expand All @@ -50,13 +51,13 @@ impl SignatureDeclaration {
Ok(types.into())
};

let body = FunctionType {
let body = FuncTypeVarLen {
input: make_type_row(&self.inputs)?,
output: make_type_row(&self.outputs)?,
extension_reqs: self.extensions.clone(),
};

let poly_func = PolyFuncType::new(op_params, body);
let poly_func = PolyFuncVarLen::new(op_params, body);
Ok(SignatureFunc::TypeScheme(CustomValidator::from_polyfunc(
poly_func,
)))
Expand Down
6 changes: 4 additions & 2 deletions hugr/src/extension/infer/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::macros::const_extension_ids;
use crate::ops::custom::{ExternalOp, OpaqueOp};
use crate::ops::{self, dataflow::IOTrait};
use crate::ops::{LeafOp, OpType};
use crate::types::type_row::RowVarOrType;
#[cfg(feature = "extension_inference")]
use crate::{
builder::test::closed_dfg_root_hugr,
Expand Down Expand Up @@ -473,11 +474,12 @@ fn make_block(
}

fn oneway(ty: Type) -> Vec<Type> {
vec![Type::new_sum([vec![ty].into()])]
vec![Type::new_sum([RowVarOrType::T(ty)])]
}

fn twoway(ty: Type) -> Vec<Type> {
vec![Type::new_sum([vec![ty.clone()].into(), vec![ty].into()])]
let r = RowVarOrType::T(ty);
vec![Type::new_sum([r.clone(), r])]
}

fn create_entry_exit(
Expand Down
64 changes: 36 additions & 28 deletions hugr/src/extension/op_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,31 @@ use super::{
};

use crate::types::type_param::{check_type_args, TypeArg, TypeParam};
use crate::types::{FunctionType, PolyFuncType};
use crate::types::{FuncTypeVarLen, FunctionType, PolyFuncVarLen};
use crate::Hugr;

/// Trait necessary for binary computations of OpDef signature
pub trait CustomSignatureFunc: Send + Sync {
/// Compute signature of node given
/// values for the type parameters,
/// Compute type scheme (perhaps polymorphic over type and/or row variables)
/// given values for the static type parameters,
/// the operation definition and the extension registry.
fn compute_signature<'o, 'a: 'o>(
&'a self,
arg_values: &[TypeArg],
def: &'o OpDef,
extension_registry: &ExtensionRegistry,
) -> Result<PolyFuncType, SignatureError>;
/// The declared type parameters which require values in order for signature to
/// be computed.
) -> Result<PolyFuncVarLen, SignatureError>;
/// The declared type parameters which for which closed values
/// (closed == without any free variables)
/// which must be provided in order for signature to be computed.
fn static_params(&self) -> &[TypeParam];
}

/// Compute signature of `OpDef` given type arguments.
pub trait SignatureFromArgs: Send + Sync {
/// Compute signature of node given
/// values for the type parameters.
fn compute_signature(&self, arg_values: &[TypeArg]) -> Result<PolyFuncType, SignatureError>;
fn compute_signature(&self, arg_values: &[TypeArg]) -> Result<PolyFuncVarLen, SignatureError>;
/// The declared type parameters which require values in order for signature to
/// be computed.
fn static_params(&self) -> &[TypeParam];
Expand All @@ -48,7 +49,7 @@ impl<T: SignatureFromArgs> CustomSignatureFunc for T {
arg_values: &[TypeArg],
_def: &'o OpDef,
_extension_registry: &ExtensionRegistry,
) -> Result<PolyFuncType, SignatureError> {
) -> Result<PolyFuncVarLen, SignatureError> {
SignatureFromArgs::compute_signature(self, arg_values)
}

Expand Down Expand Up @@ -121,14 +122,14 @@ pub trait CustomLowerFunc: Send + Sync {
#[derive(serde::Deserialize, serde::Serialize)]
pub struct CustomValidator {
#[serde(flatten)]
poly_func: PolyFuncType,
poly_func: PolyFuncVarLen,
#[serde(skip)]
validate: Box<dyn ValidateTypeArgs>,
}

impl CustomValidator {
/// Encode a signature using a `PolyFuncType`
pub fn from_polyfunc(poly_func: impl Into<PolyFuncType>) -> Self {
pub fn from_polyfunc(poly_func: impl Into<PolyFuncVarLen>) -> Self {
Self {
poly_func: poly_func.into(),
validate: Default::default(),
Expand All @@ -138,7 +139,7 @@ impl CustomValidator {
/// Encode a signature using a `PolyFuncType`, with a custom function for
/// validating type arguments before returning the signature.
pub fn new_with_validator(
poly_func: impl Into<PolyFuncType>,
poly_func: impl Into<PolyFuncVarLen>,
validate: impl ValidateTypeArgs + 'static,
) -> Self {
Self {
Expand Down Expand Up @@ -187,14 +188,15 @@ impl<T: CustomSignatureFunc + 'static> From<T> for SignatureFunc {
}
}

impl From<PolyFuncType> for SignatureFunc {
fn from(v: PolyFuncType) -> Self {
impl From<PolyFuncVarLen> for SignatureFunc {
fn from(v: PolyFuncVarLen) -> Self {
Self::TypeScheme(CustomValidator::from_polyfunc(v))
}
}

impl From<FunctionType> for SignatureFunc {
fn from(v: FunctionType) -> Self {
impl From<FuncTypeVarLen> for SignatureFunc {
// ALAN might want to be FunctionType?
fn from(v: FuncTypeVarLen) -> Self {
Self::TypeScheme(CustomValidator::from_polyfunc(v))
}
}
Expand All @@ -213,7 +215,7 @@ impl SignatureFunc {
}
}

/// Compute the concrete signature ([FunctionType]).
/// Compute the concrete signature ([FunctionType]) for a node
///
/// # Panics
///
Expand All @@ -230,7 +232,7 @@ impl SignatureFunc {
args: &[TypeArg],
exts: &ExtensionRegistry,
) -> Result<FunctionType, SignatureError> {
let temp: PolyFuncType;
let temp: PolyFuncVarLen;
let (pf, args) = match &self {
SignatureFunc::TypeScheme(custom) => {
custom.validate.validate(args, def, exts)?;
Expand All @@ -246,7 +248,12 @@ impl SignatureFunc {
}
};

let res = pf.instantiate(args, exts)?;
// The first instantiate returns a FuncTypeVarLen, i.e. expressed using 'RowVarOrType's.
// try_into removes possibility of containing any RowVars by expressing directly using 'Type's.
let res = pf
.instantiate(args, exts)?
.try_into()
.map_err(|(idx, bound)| SignatureError::ContainsRowVars { idx, bound })?;
// TODO bring this assert back once resource inference is done?
// https://github.com/CQCL/hugr/issues/388
// debug_assert!(res.extension_reqs.contains(def.extension()));
Expand Down Expand Up @@ -324,7 +331,7 @@ impl OpDef {
exts: &ExtensionRegistry,
var_decls: &[TypeParam],
) -> Result<(), SignatureError> {
let temp: PolyFuncType; // to keep alive
let temp: PolyFuncVarLen; // to keep alive
let (pf, args) = match &self.signature_func {
SignatureFunc::TypeScheme(ts) => (&ts.poly_func, args),
SignatureFunc::CustomFunc(custom) => {
Expand Down Expand Up @@ -437,7 +444,7 @@ impl OpDef {

impl Extension {
/// Add an operation definition to the extension. Must be a type scheme
/// (defined by a [`PolyFuncType`]), a type scheme along with binary
/// (defined by a [`PolyFuncVarLen`]), a type scheme along with binary
/// validation for type arguments ([`CustomValidator`]), or a custom binary
/// function for computing the signature given type arguments (`impl [CustomSignatureFunc]`).
pub fn add_op(
Expand Down Expand Up @@ -479,8 +486,8 @@ mod test {
use crate::ops::custom::ExternalOp;
use crate::ops::LeafOp;
use crate::std_extensions::collections::{EXTENSION, LIST_TYPENAME};
use crate::types::Type;
use crate::types::{type_param::TypeParam, FunctionType, PolyFuncType, TypeArg, TypeBound};
use crate::types::type_param::TypeParam;
use crate::types::{FuncTypeVarLen, FunctionType, PolyFuncVarLen, Type, TypeArg, TypeBound};
use crate::Hugr;
use crate::{const_extension_ids, Extension};

Expand All @@ -496,7 +503,8 @@ mod test {
let list_of_var =
Type::new_extension(list_def.instantiate(vec![TypeArg::new_var_use(0, TP)])?);
const OP_NAME: SmolStr = SmolStr::new_inline("Reverse");
let type_scheme = PolyFuncType::new(vec![TP], FunctionType::new_endo(vec![list_of_var]));
let type_scheme =
PolyFuncVarLen::new(vec![TP], FuncTypeVarLen::new_endo(vec![list_of_var]));

let def = e.add_op(OP_NAME, "desc".into(), type_scheme)?;
def.add_lower_func(LowerFunc::FixedHugr(ExtensionSet::new(), Hugr::default()));
Expand Down Expand Up @@ -535,7 +543,7 @@ mod test {
fn compute_signature(
&self,
arg_values: &[TypeArg],
) -> Result<PolyFuncType, SignatureError> {
) -> Result<PolyFuncVarLen, SignatureError> {
const TP: TypeParam = TypeParam::Type { b: TypeBound::Any };
let [TypeArg::BoundedNat { n }] = arg_values else {
return Err(SignatureError::InvalidTypeArgs);
Expand All @@ -544,9 +552,9 @@ mod test {
let tvs: Vec<Type> = (0..n)
.map(|_| Type::new_var_use(0, TypeBound::Any))
.collect();
Ok(PolyFuncType::new(
Ok(PolyFuncVarLen::new(
vec![TP.to_owned()],
FunctionType::new(tvs.clone(), vec![Type::new_tuple(tvs)]),
FuncTypeVarLen::new(tvs.clone(), vec![Type::new_tuple(tvs)]),
))
}

Expand Down Expand Up @@ -621,9 +629,9 @@ mod test {
let def = e.add_op(
"SimpleOp".into(),
"".into(),
PolyFuncType::new(
PolyFuncVarLen::new(
vec![TypeBound::Any.into()],
FunctionType::new_endo(vec![Type::new_var_use(0, TypeBound::Any)]),
FuncTypeVarLen::new_endo(vec![Type::new_var_use(0, TypeBound::Any)]),
),
)?;
let tv = Type::new_var_use(1, TypeBound::Eq);
Expand Down
10 changes: 5 additions & 5 deletions hugr/src/extension/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::{
type_row,
types::{
type_param::{TypeArg, TypeParam},
CustomType, FunctionType, PolyFuncType, Type, TypeBound,
CustomType, FuncTypeVarLen, PolyFuncVarLen, Type, TypeBound,
},
Extension,
};
Expand All @@ -21,7 +21,7 @@ struct ArrayOpCustom;

const MAX: &[TypeParam; 1] = &[TypeParam::max_nat()];
impl SignatureFromArgs for ArrayOpCustom {
fn compute_signature(&self, arg_values: &[TypeArg]) -> Result<PolyFuncType, SignatureError> {
fn compute_signature(&self, arg_values: &[TypeArg]) -> Result<PolyFuncVarLen, SignatureError> {
let [TypeArg::BoundedNat { n }] = *arg_values else {
return Err(SignatureError::InvalidTypeArgs);
};
Expand All @@ -30,9 +30,9 @@ impl SignatureFromArgs for ArrayOpCustom {
let var_arg_row = vec![elem_ty_var.clone(); n as usize];
let other_row = vec![array_type(TypeArg::BoundedNat { n }, elem_ty_var.clone())];

Ok(PolyFuncType::new(
Ok(PolyFuncVarLen::new(
vec![TypeBound::Any.into()],
FunctionType::new(var_arg_row, other_row),
FuncTypeVarLen::new(var_arg_row, other_row),
))
}

Expand Down Expand Up @@ -92,7 +92,7 @@ lazy_static! {
.add_op(
SmolStr::new_inline(PANIC_OP_ID),
"Panic with input error".to_string(),
FunctionType::new(type_row![Type::new_extension(ERROR_CUSTOM_TYPE)], type_row![]),
FuncTypeVarLen::new(type_row![Type::new_extension(ERROR_CUSTOM_TYPE)], type_row![]),
)
.unwrap();
prelude
Expand Down
4 changes: 2 additions & 2 deletions hugr/src/extension/simple_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ impl<T: MakeRegisteredOp> From<T> for OpType {

#[cfg(test)]
mod test {
use crate::{const_extension_ids, type_row, types::FunctionType};
use crate::{const_extension_ids, type_row, types::FuncTypeVarLen};

use super::*;
use lazy_static::lazy_static;
Expand All @@ -238,7 +238,7 @@ mod test {

impl MakeOpDef for DummyEnum {
fn signature(&self) -> SignatureFunc {
FunctionType::new_endo(type_row![]).into()
FuncTypeVarLen::new_endo(type_row![]).into()
}

fn from_def(_op_def: &OpDef) -> Result<Self, OpLoadError> {
Expand Down
4 changes: 2 additions & 2 deletions hugr/src/extension/type_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ mod test {
use crate::extension::SignatureError;
use crate::std_extensions::arithmetic::float_types::FLOAT64_TYPE;
use crate::types::type_param::{TypeArg, TypeArgError, TypeParam};
use crate::types::{FunctionType, Type, TypeBound};
use crate::types::{FuncTypeVarLen, Type, TypeBound};

use super::{TypeDef, TypeDefBound};

Expand All @@ -186,7 +186,7 @@ mod test {
};
let typ = Type::new_extension(
def.instantiate(vec![TypeArg::Type {
ty: Type::new_function(FunctionType::new(vec![], vec![])),
ty: Type::new_function(FuncTypeVarLen::default()),
}])
.unwrap(),
);
Expand Down
Loading
Loading