agda / agda

Agda is a dependently typed programming language / interactive theorem prover.
https://wiki.portal.chalmers.se/agda/pmwiki.php
Other
2.41k stars 339 forks source link

TBT: no function nor calls listed in termination error #7278

Open andreasabel opened 1 month ago

andreasabel commented 1 month ago
{-# OPTIONS --no-syntax-based-termination #-}
{-# OPTIONS --type-based-termination #-}

module TypeBasedTermination.CopatternNonterminating where

open import Agda.Builtin.Equality

record Stream (A : Set) : Set where
  coinductive
  field
    head : A
    tail : Stream A
module S = Stream

illdefined : {A : Set} → Stream A
S.head illdefined = S.head illdefined
S.tail illdefined = S.tail illdefined
-- should not termination-check

The error is:

15,1-17,38
Termination checking failed for the following functions:
Problematic calls:

The error should be about function illdefined.

This issue has been reported before in