-
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: Ensure packages always have modules at the root (#1589)
Followup to #1587. Ensures that rust `Package`s only contain module-rooted hugrs. Returns errors at construction times if the condition is not met. This required fixing `hugr-cli`, as it should be able to load both packages and arbitrary hugrs. Added `Package::from_hugr{,s}` methods that try to wrap the hugrs if possible. We'll need these for tket2. Packages are not on the spec yet, their description should include this restriction. See #1388. This PR does only modify the (unpublished) API introduced in #1587, so I'm not marking it as breaking.
- Loading branch information
Showing
5 changed files
with
326 additions
and
33 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
Oops, something went wrong.