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
/// Fallibly convert a [TypeArg] to a [TypeRowRV].////// This will fail if `arg` is of non-sequence kind (e.g. Type)./// TODO move this to `impl TypeArg` in `hugr-core`pubfntype_arg_into_type_row_rv(arg:implInto<TypeArg>) -> Option<TypeRowRV>{match arg.into(){TypeArg::Sequence{ elems } => elems
.into_iter().map(type_arg_into_type_rv).collect::<Option<Vec<_>>>().map(|x| x.into()),TypeArg::Variable{ v } => {Some(vec![TypeRV::new_row_var_use(v.index(), v.bound_if_row_var()?)].into())}
_ => None,}}/// Fallibly convert a [TypeArg] to a [TypeRow].////// This will fail if `arg` is of non-sequence kind (e.g. Type)/// or if the sequence contains row variables./// TODO move this to `impl TypeArg` in `hugr-core`pubfntype_arg_into_type_row(arg:implInto<TypeArg>) -> Option<TypeRow>{match arg.into(){TypeArg::Sequence{ elems } => elems
.into_iter().map(type_arg_into_type).collect::<Option<Vec<_>>>().map(|x| x.into()),
_ => None,}}
The text was updated successfully, but these errors were encountered:
I needed them out of tree and wrote:
The text was updated successfully, but these errors were encountered: