Skip to content

Commit 6556085

Browse files
committed
chore: update extension
1 parent eedf03d commit 6556085

File tree

3 files changed

+163
-3
lines changed

3 files changed

+163
-3
lines changed

hugr-core/src/std_extensions/collections/borrow_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub const BORROW_ARRAY_VALUENAME: TypeName = TypeName::new_inline("borrow_array"
4545
/// Reported unique name of the extension
4646
pub const EXTENSION_ID: ExtensionId = ExtensionId::new_unchecked("collections.borrow_arr");
4747
/// Extension version.
48-
pub const VERSION: semver::Version = semver::Version::new(0, 1, 1);
48+
pub const VERSION: semver::Version = semver::Version::new(0, 1, 2);
4949

5050
/// A linear, unsafe, fixed-length collection of values.
5151
///

hugr-py/src/hugr/std/_json_defs/collections/borrow_arr.json

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1.1",
2+
"version": "0.1.2",
33
"name": "collections.borrow_arr",
44
"types": {
55
"borrow_array": {
@@ -493,6 +493,86 @@
493493
},
494494
"binary": false
495495
},
496+
"is_borrowed": {
497+
"extension": "collections.borrow_arr",
498+
"name": "is_borrowed",
499+
"description": "Check if an element in a borrow array has been borrowed",
500+
"signature": {
501+
"params": [
502+
{
503+
"tp": "BoundedNat",
504+
"bound": null
505+
},
506+
{
507+
"tp": "Type",
508+
"b": "A"
509+
}
510+
],
511+
"body": {
512+
"input": [
513+
{
514+
"t": "Opaque",
515+
"extension": "collections.borrow_arr",
516+
"id": "borrow_array",
517+
"args": [
518+
{
519+
"tya": "Variable",
520+
"idx": 0,
521+
"cached_decl": {
522+
"tp": "BoundedNat",
523+
"bound": null
524+
}
525+
},
526+
{
527+
"tya": "Type",
528+
"ty": {
529+
"t": "V",
530+
"i": 1,
531+
"b": "A"
532+
}
533+
}
534+
],
535+
"bound": "A"
536+
},
537+
{
538+
"t": "I"
539+
}
540+
],
541+
"output": [
542+
{
543+
"t": "Sum",
544+
"s": "Unit",
545+
"size": 2
546+
},
547+
{
548+
"t": "Opaque",
549+
"extension": "collections.borrow_arr",
550+
"id": "borrow_array",
551+
"args": [
552+
{
553+
"tya": "Variable",
554+
"idx": 0,
555+
"cached_decl": {
556+
"tp": "BoundedNat",
557+
"bound": null
558+
}
559+
},
560+
{
561+
"tya": "Type",
562+
"ty": {
563+
"t": "V",
564+
"i": 1,
565+
"b": "A"
566+
}
567+
}
568+
],
569+
"bound": "A"
570+
}
571+
]
572+
}
573+
},
574+
"binary": false
575+
},
496576
"new_all_borrowed": {
497577
"extension": "collections.borrow_arr",
498578
"name": "new_all_borrowed",

specification/std_extensions/collections/borrow_arr.json

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1.1",
2+
"version": "0.1.2",
33
"name": "collections.borrow_arr",
44
"types": {
55
"borrow_array": {
@@ -493,6 +493,86 @@
493493
},
494494
"binary": false
495495
},
496+
"is_borrowed": {
497+
"extension": "collections.borrow_arr",
498+
"name": "is_borrowed",
499+
"description": "Check if an element in a borrow array has been borrowed",
500+
"signature": {
501+
"params": [
502+
{
503+
"tp": "BoundedNat",
504+
"bound": null
505+
},
506+
{
507+
"tp": "Type",
508+
"b": "A"
509+
}
510+
],
511+
"body": {
512+
"input": [
513+
{
514+
"t": "Opaque",
515+
"extension": "collections.borrow_arr",
516+
"id": "borrow_array",
517+
"args": [
518+
{
519+
"tya": "Variable",
520+
"idx": 0,
521+
"cached_decl": {
522+
"tp": "BoundedNat",
523+
"bound": null
524+
}
525+
},
526+
{
527+
"tya": "Type",
528+
"ty": {
529+
"t": "V",
530+
"i": 1,
531+
"b": "A"
532+
}
533+
}
534+
],
535+
"bound": "A"
536+
},
537+
{
538+
"t": "I"
539+
}
540+
],
541+
"output": [
542+
{
543+
"t": "Sum",
544+
"s": "Unit",
545+
"size": 2
546+
},
547+
{
548+
"t": "Opaque",
549+
"extension": "collections.borrow_arr",
550+
"id": "borrow_array",
551+
"args": [
552+
{
553+
"tya": "Variable",
554+
"idx": 0,
555+
"cached_decl": {
556+
"tp": "BoundedNat",
557+
"bound": null
558+
}
559+
},
560+
{
561+
"tya": "Type",
562+
"ty": {
563+
"t": "V",
564+
"i": 1,
565+
"b": "A"
566+
}
567+
}
568+
],
569+
"bound": "A"
570+
}
571+
]
572+
}
573+
},
574+
"binary": false
575+
},
496576
"new_all_borrowed": {
497577
"extension": "collections.borrow_arr",
498578
"name": "new_all_borrowed",

0 commit comments

Comments
 (0)