-
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.
Splits the mutable methods between `HugrMutInternals` & `HugrMut`. When implemented by a (future) non-`AsMut<Hugr>`, the default impl checks whether the related nodes are valid in the view before calling the internal hugrs mutable primitives. Other small changes: - Moved `canonicalize_nodes` from `HugrMut` to `Hugr`, since it doesn't make sense to call in on a view. - Added a root parameter to `Hugr::canonical_order` so we can get the canonical order for regions. - Added an assert to validate the root type when querying a hugrview - ~Add a lifetime to `HugrInternals::Portgraph` so the views can return clones instead of double references.~ I had to roll it back due to the convex check requiring `Copy` on the portgraph view. --------- Co-authored-by: Seyon Sivarajah <seyon.sivarajah@quantinuum.com>
- Loading branch information
Showing
16 changed files
with
497 additions
and
404 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
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
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.