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

Support where clauses on opaque types #563

Merged
merged 4 commits into from
Jul 20, 2020

Conversation

nathanwhit
Copy link
Member

This PR iterates upon #498 to try to address the review comments there.

@nathanwhit nathanwhit force-pushed the opaque-where-clauses branch 2 times, most recently from d891c65 to ce1f9ad Compare July 15, 2020 03:17
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Left a few nits but this looks correct.

/// AliasEq(T<U> = !T<U>).
/// WF(T<U>) :- WF(U: C).
/// Implemented(!T<U>: A).
/// Implemented(!T<U>: B).
Copy link
Contributor

Choose a reason for hiding this comment

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

So this seems right, but also sort of...incomplete, in that we never use these where clauses as hypotheses. I guess this is because we would want to do that in the well-formedness checking for the opaque type definition, which is not yet implemented?

Copy link
Member Author

Choose a reason for hiding this comment

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

That was my thinking as well. I was thinking those checks would probably belong around here based on what we do for ADTs and trait impls. I figure we could save that for a follow-up PR.

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.

3 participants