File tree Expand file tree Collapse file tree 3 files changed +163
-3
lines changed
hugr-core/src/std_extensions/collections
hugr-py/src/hugr/std/_json_defs/collections
specification/std_extensions/collections Expand file tree Collapse file tree 3 files changed +163
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ pub const BORROW_ARRAY_VALUENAME: TypeName = TypeName::new_inline("borrow_array"
45
45
/// Reported unique name of the extension
46
46
pub const EXTENSION_ID : ExtensionId = ExtensionId :: new_unchecked ( "collections.borrow_arr" ) ;
47
47
/// 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 ) ;
49
49
50
50
/// A linear, unsafe, fixed-length collection of values.
51
51
///
Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " 0.1.1 " ,
2
+ "version" : " 0.1.2 " ,
3
3
"name" : " collections.borrow_arr" ,
4
4
"types" : {
5
5
"borrow_array" : {
493
493
},
494
494
"binary" : false
495
495
},
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
+ },
496
576
"new_all_borrowed" : {
497
577
"extension" : " collections.borrow_arr" ,
498
578
"name" : " new_all_borrowed" ,
Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " 0.1.1 " ,
2
+ "version" : " 0.1.2 " ,
3
3
"name" : " collections.borrow_arr" ,
4
4
"types" : {
5
5
"borrow_array" : {
493
493
},
494
494
"binary" : false
495
495
},
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
+ },
496
576
"new_all_borrowed" : {
497
577
"extension" : " collections.borrow_arr" ,
498
578
"name" : " new_all_borrowed" ,
You can’t perform that action at this time.
0 commit comments