Skip to content

Commit

Permalink
feat!: Make array repeat and scan ops generic over extension reqs (#1716
Browse files Browse the repository at this point in the history
)

Closes #1714

BREAKING CHANGE: Array `scan` and `repeat` ops get an additional type
parameter specifying the extension requirements of their input
functions. Furthermore, `repeat` is no longer part of `ArrayOpDef` but
is instead specified via a new `ArrayScan` struct.
  • Loading branch information
mark-koch authored Dec 9, 2024
1 parent f9a3446 commit 4c1c6ee
Show file tree
Hide file tree
Showing 4 changed files with 261 additions and 38 deletions.
1 change: 1 addition & 0 deletions hugr-core/src/extension/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ lazy_static! {
NoopDef.add_to_extension(prelude, extension_ref).unwrap();
LiftDef.add_to_extension(prelude, extension_ref).unwrap();
array::ArrayOpDef::load_all_ops(prelude, extension_ref).unwrap();
array::ArrayRepeatDef.add_to_extension(prelude, extension_ref).unwrap();
array::ArrayScanDef.add_to_extension(prelude, extension_ref).unwrap();
})
};
Expand Down
Loading

0 comments on commit 4c1c6ee

Please sign in to comment.