Constraint solving fails unless an unused variable is marked as erased #5342
Labels
constraints
Constraints (postponed type checking problems, postponed unification problems, instance constraints)
erasure
status: abandoned
Work on this issue has been abandoned (not in changelog)
type: bug
Issues and pull requests about actual bugs
Milestone
This issue has been broken out of issue #4525.
Agda accepts the following code:
However, if the final occurrence of
@0
is removed, then the code is rejected. Given that this annotation applies to an unused argument this seems like a bug to me. (The code is accepted again if the last underscore is replaced withQ
.)I compared the debug printout (
-vtc:20 -vtc.meta:40
) for the code above with the code where the last instance of@0
has been removed, and it appears as if in the former case the meta-variable_140
is η-expanded, but not in the latter case. The meta-variable is η-expanded after the following message:There is no occurrence of
oops
in the debug printout for the failing code.Some information related to the instantiation of
_140
seems to be missing:This error message refers to an empty substitution:
agda/src/full/Agda/TypeChecking/Rules/LHS.hs
Line 746 in aea2c53
I don't know if this internal error is benign or indicative of a broken invariant. Is the right context used?
agda/src/full/Agda/TypeChecking/MetaVars.hs
Lines 579 to 583 in aea2c53
Note that if the change that I suggest in issue #5341 is adopted, then it does not matter whether
@0
is present or not, the code is always rejected.The text was updated successfully, but these errors were encountered: