[Agda] Termination checking failure
Ivan Tomac
tomac at pobox.com
Sun Nov 22 13:28:18 CET 2009
Hi,
How would I go about rewriting the code in the attached file so that it
passes termination checking? And why is the termination checker failing
in first place?
I'm guessing it's probably due to my lack of understanding of
coinduction and codata and how they are handled in Agda - from reading
the Agda wiki and going through the standard libraries I thought this
would work.
I would appreciate any pointers to papers, articles or books.
Ivan
-------------- next part --------------
module Test where
open import Coinduction
data Id (A : Set) : Set where
id : A â Id A
data Stream (A : Set) : Set where
cons : A â â (Stream A) â Stream A
unId : â {A} â Id A â A
unId (id A) = A
sequence : â {A} â Stream (Id A) â Id (Stream A)
sequence (cons (id a) is) = id (cons a (⯠unId (sequence (â is))))
More information about the Agda
mailing list