-
Notifications
You must be signed in to change notification settings - Fork 11
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
infinite loop during type-checking #250
Comments
Missing occurs check? |
We do have an occurs check for the type-checker... but not for the kind-checker! The problem is that we have a |
Turns out the problem was not quite an occurs-check. An easy way to trigger the problem is to unify Before the first unification, The first unification is a flex-flex case with two roots, so we arbitrarily choose to make The second unification is a flex-flex case with one root. We make the root |
I have fixed the problem in #251, but separately, we should still add an occurs-check to the kind checker. Let's see, what kind of example would trigger the problem? 🤔 |
Ah, but of course, the type It turns out that the syntax
|
#251 now has uses both examples in this file as a test, and fixes both bugs. Note that if I only added the kind-level occurs-check, then the first example would be rejected instead of accepted, so there really were two separate bugs. |
Somehow, giving the compiler some help in figuring out the type of
(mk-phantom-1)
causes it to loop forever :(The text was updated successfully, but these errors were encountered: