-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!:
used_extensions
calls for both ops and signatures (#1739)
Adds methods - `OpType::used_extensions(&self) -> Result<ExtensionRegistry, _>` - `Signature::used_extensions(&self) -> Result<ExtensionRegistry, _>` and tests these along with the code merged in #1735. Moves the code from #1735 into `resolution::types_mut`, and adds a (quite-similar) non-mutable version in `::types` that only collects the extensions without modifying the `OpType`. Fixes the resolution not exploring types inside a `CustomType` type arguments. drive-by: Implement `Display`, `Serialize`, and `::new` for `ExtensionRegistry`. drive-by: `ExtensionSet` should take ids by value when inserting. drive-by: Fix `Hugr::resolve_extension_defs` not scanning all the ops. These changes were extracted from #1738. BREAKING CHANGE: Removed `ExtensionRegistry::try_new`. Use `new` instead, and call `ExtensionRegistry::validate` to validate. BREAKING CHANGE: `ExtensionSet::insert` and `singleton` take extension ids by value instead of cloning internally.
- Loading branch information
Showing
45 changed files
with
1,097 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.