-
Notifications
You must be signed in to change notification settings - Fork 182
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
Goals and folding goals #325
Goals and folding goals #325
Conversation
The previous setup was over-designed and cumbersome to use, even if in some bizarre sense theoretically elegant. I apologize.
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.
Overall I like this; cleans up this quite a bit. That as_dyn
is a bit ugly, but not sure there's a way around that.
|
||
/// Folding a goal invokes the `fold_goal` callback (which will, by | ||
/// default, invoke super-fold). | ||
impl<TF: TypeFamily, TTF: TargetTypeFamily<TF>> Fold<TF, TTF> for Goal<TF> { |
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.
Why remove this from boring_impls
?
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.
It's not boring. It invokes a callback on folder rather than just recursively reproducing its structure.
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 this naming scheme isn't obvious to everyone else though. :)
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.
Yeah, my thought for "boring" is either boilerplate-like code or code that is extremely simple.
OK, @jackh726, I think I addressed all your comments. |
Yeah, LGTM |
Refactors how the Folder is setup:
The motivation for this work is to work towards the "syntactic equality" goal, where we desugar aliases into a combination of an inference variable and an alias goal ahead of time, rather than building "rich type equality" into the solver itself.