-
-
Notifications
You must be signed in to change notification settings - Fork 414
Wingman: Use awareness of skolems when filtering GADT data constructors #2172
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
Conversation
| matches <- | ||
| liftMaybe $ | ||
| destructionFor | ||
| -- TODO(sandy): This needs a judgment in order to correctly compute |
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.
Filed at #2173
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 it worths to add the link to the issue?
jneira
left a comment
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.
https://en.wikipedia.org/wiki/Thoralf_Skolem force be with you!
…ge-server into skolem-evidence
|
I am afraid this needs a rebase |
…ge-server into skolem-evidence
|
The test failure in should be: eval (IntLit n) = nusing GADT evidence, but instead we get: eval (IntLit n) = _w0Looks like it didn't learn that the type variable is equal to |
GHC provides
dataConCannotMatch, which WIngman was using to filter out GADT data constructors which don't typecheck. But GHC doesn't do any reasoning about skolems in this function, so it assumes it can just unify any type variables that are present. This is entirely wrong --- skolems are definitely apart for all of Wingman's purposes.Fixes #2171