Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Refactor: move
rewrite
insidehugr
,Rewrite
->Replace
implementing new 'Rewrite' trait #119Refactor: move
rewrite
insidehugr
,Rewrite
->Replace
implementing new 'Rewrite' trait #119Changes from 16 commits
80703e1
9ef30ad
75b9f1f
5c5662f
de70383
3a534e6
55f83ba
76d13fe
6e8b152
99b31ce
070afdd
7348e11
9349aa4
ec8354e
147c937
9f1d382
f0b5b82
45c5fc2
8f8fcae
4604c70
a83a93e
0291bba
3572933
04c8777
6070e20
4202f5e
4553395
0201233
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative is to return
Result<(), Option<E>>
where returning Err(None) means, no guarantee can be given aboutapply
. If a rewrite really has to get partway through in order to complete its own validity checks then said alternative would support that. But I think we should leave asResult<(), E>
until/unless we find a Rewrite where that's difficult.(Compound Rewrites is one such case. For a sequence of rewrites,
verify
might have to clone() the Hugr, and then step through the sequence,apply
ing each rewrite beforeverify
ing the next.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say custom enums with
{Recoverable, NonRecoverable}
variants rather thanOption<E>
.But yeah, let's keep it simple for now.
This file was deleted.
This file was deleted.