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

seal PrimType trait #296

Merged
merged 1 commit into from
Jul 26, 2023
Merged

seal PrimType trait #296

merged 1 commit into from
Jul 26, 2023

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Jul 26, 2023

Closes #289

@ss2165 ss2165 requested a review from aborgna-q July 26, 2023 15:11
// may be updated with functions in future for necessary shared functionality
// across ClassicType, SimpleType and HashableType.
// Currently used to constrain Container<T>
/// Tells us the [TypeTag] of the type represented by the receiver.
fn tag(&self) -> TypeTag;
}

// sealed trait pattern to prevent users extending PrimType
mod private {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to be consistent with hugr::view::sealed

mod sealed {

@ss2165 ss2165 merged commit 90a3443 into main Jul 26, 2023
6 checks passed
@ss2165 ss2165 deleted the refactor/sealed-prim branch July 26, 2023 15:20
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.

Make PrimType sealed
2 participants