-
Notifications
You must be signed in to change notification settings - Fork 8
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
Rename Region
views
#347
Rename Region
views
#347
Conversation
Credits to @acl-cqc for the suggestions! |
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 like the names, and the reserving of View
for traits. Just a suggestion on the module name.
src/hugr/hierarchy.rs
Outdated
@@ -1,14 +1,16 @@ | |||
//! Region-level views of a HUGR. |
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.
maybe the file/module should be called views.rs
?
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 would like that, but there is already the view.rs
file in the same folder that contains HugrView
etc.
I could make a views
folder with
views/hugr.rs
views/hierarchy.rs
in it?
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.
or just go with hierarchical_views
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.
👍 thanks
* Add simpler variant of Resource.add_op_custom_sig(). * Use Resource.add_op_custom_sig_simple() where possible. * Fix typo in spec. * Define SignatureError::InvalidTypeArgs. * Define HashableType::OpError. * Define TypeArgError::InvalidValue. * Implement Arithmetic Resource. * Use constants rather than functions for type IDs. * Move arithmetic.rs to arithmetic/mod.rs. * Add method to create a resource with requirements. * Add method to create a ResourceSet from some resources. * Refactor into separate modules. * Rename `Region` views (#347) * Rename `Region` views * Rename hierarchy -> hierarchical_views * separate TypeParam hierarchy (#364) * separate TypeParam hierarchy Closes #359 * address review comments * move the contents of typecheck.rs to values.rs * more review comments * cherry-pick CustomTypeArg from #335 * define TypeTag::contains and use in arg check * Post-merge fixup. * Remove INT_PARAM constant. * Use constants for resource IDs, and settle on lowercase. * Remove HashableType::OpError and just use String (for now). * Make SignatureError::InvalidTypeArgs a constant. * Use utility function collect_array(). --------- Co-authored-by: Luca Mondada <[email protected]> Co-authored-by: Seyon Sivarajah <[email protected]>
I propose the following renaming
FlatRegionView
->SiblingGraph
RegionView
->DescendantsGraph
Region
->HierarchyView
I've reserved the term
View
for the trait rather than thestruct
s as that is closer to our use of the word elsewhere. Happy to discuss other opinions.In addition to being more descriptive, this will also allow us to make the complementarity with #336 more obvious.