Higher constructors can trick the productivity checker #6108
Labels
documented-in-changelog
Issues already documented in the CHANGELOG
guardedness
Problems of the guardedness checker for coinduction.
type: bug
Issues and pull requests about actual bugs
Milestone
Agda's productivity checker seems to be satisfied by a definition being guarded by higher constructors. However, higher constructors can reduce to non-constructors at their endpoints, allowing definitions like this to be accepted:
Normalizing
force hmm
is an infinite loop.This example is wrong in an obvious way, because
wait i0 = force
, so the definition ofhmm
is actually equivalent toforce hmm = force hmm
. But, it'd be really nice if a proper understanding of how this should work also rules outP A
being contractible:since this definition also contains, as a specialization:
contr x i0 .force = contr x i0 .force
Although in that case it evaluates like
contr x i0 .force = x .force
, so perhaps this is too much to hope for.The text was updated successfully, but these errors were encountered: