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 HUGR payload to PrimValue::Function #431

Merged
merged 2 commits into from
Aug 22, 2023
Merged

add HUGR payload to PrimValue::Function #431

merged 2 commits into from
Aug 22, 2023

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Aug 21, 2023

add get_function_type method to HugrView to report the function type
of the root if valid.

Closes #374

add `get_function_type` method to HugrView to report the function type
of the root if valid.
@ss2165 ss2165 requested a review from croyzor August 21, 2023 16:05
@@ -315,6 +319,15 @@ where
}
}

fn get_function_type(&self, node: Node) -> Option<&FunctionType> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for the purposes this PR is working towards, this should always return the function type for the root. For purposes other than getting the function type of a hugr, people can use get_nodetype as you have

@ss2165 ss2165 requested a review from croyzor August 22, 2023 12:56
@ss2165 ss2165 added this pull request to the merge queue Aug 22, 2023
Merged via the queue into main with commit 5ae71ed Aug 22, 2023
@ss2165 ss2165 deleted the new/function-value branch August 22, 2023 13:15
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.

Add PrimValue::Graph
2 participants