Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a root NodeHandle type param to HugrView #398

Merged
merged 2 commits into from
Aug 11, 2023
Merged

Conversation

aborgna-q
Copy link
Collaborator

I'll say this closes #380.

We could go further and add a type parameter in Hugr<T: NodeHandle>, but that would probably be annoying to use and it'd break the pyo3 machinery.

Instead, most things should be interfacing via HugrView. #284 / #293 will move the builder references to views instead, so we will be able to statically check the root type.

@aborgna-q aborgna-q requested a review from ss2165 August 11, 2023 14:08
@aborgna-q aborgna-q added this pull request to the merge queue Aug 11, 2023
Merged via the queue into main with commit 056da40 Aug 11, 2023
5 checks passed
@aborgna-q aborgna-q deleted the feat/hugr-view-root branch August 11, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parametrize Hugr by its root type
2 participants