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

Treat holes as non-rigid meta-variables during instance search #3293

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Jan 22, 2025

  • Closes Instances cannot be resolved if the type contains holes #3157
  • During instance search, the holes are now treated like meta-variables -- they match anything. The holes are not unified during instance search, but on success all dangling meta-variables are replaced by fresh holes which later need to be filled by the type-checker. In rare situations, the type-checker might not be able to fill them even though instance resolution succeeded (then we get the "Unable to infer the hole" error).

@lukaszcz lukaszcz added this to the 0.6.10 milestone Jan 22, 2025
@lukaszcz lukaszcz self-assigned this Jan 22, 2025
@lukaszcz lukaszcz force-pushed the instance-resolution-with-holes branch from 4c85766 to 5cf3216 Compare January 22, 2025 13:08
@lukaszcz lukaszcz marked this pull request as ready for review January 22, 2025 13:09
@lukaszcz lukaszcz marked this pull request as draft January 22, 2025 14:43
@lukaszcz lukaszcz force-pushed the instance-resolution-with-holes branch from 5cf3216 to daca1d0 Compare January 22, 2025 14:44
@lukaszcz lukaszcz marked this pull request as ready for review January 22, 2025 15:17
@lukaszcz lukaszcz merged commit 6ff4d88 into main Jan 22, 2025
7 of 8 checks passed
@lukaszcz lukaszcz deleted the instance-resolution-with-holes branch January 22, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instances cannot be resolved if the type contains holes
2 participants