-
Notifications
You must be signed in to change notification settings - Fork 344
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
"Refuse to construct infinite term" in an innocent-looking code #795
Comments
Original comment by |
Here is an analysis of the situation: Agda first creates a (closed) meta variable
Then it checks
(After what it does now, it still needs to check that
It would be smart if that was done first.) In context A : Set, continues to check
Since the type of f is F N = (A : Set) -> N (Q A) -> N A, the created meta,
and we are left with checking that the inferred type of f (?A A),
is a subtype of
This yields two equations
The second one is solved as
simpliying the remaining equation to
and further to
The expected solution is, of course, the identity, but it cannot be At this point, another solution is ?A = Q. If Agda postponed here, it would come to the problem
simplified to ?N = N and instantiated to
This would solve ?A to be the identity. Original comment by
|
Oh! And why does changing Q to be a postulate help then? Original comment by |
Original comment by |
Original comment by
|
The code:
The error message:
The error can be fixed in one of the following ways:
I can't explain why any of those changes fix the error or what the error is,
but it sure looks like a bug to me!
Original issue reported on code.google.com by
rot...@gmail.com
on 18 Feb 2013 at 3:35The text was updated successfully, but these errors were encountered: