[Agda] --termination-depth

gallais guillaume.allais at ens-lyon.org
Thu Mar 5 17:47:06 CET 2015


Hi Sergei,

We can't really comment on the termination issue without the
body of the function. E.g. yesterday I was struggling with
non termination in a situation quite similar to yours because
my recursive calls where nested under a pattern-matching lambda.
Reorganising the function's body did the trick.

Cheers,

On 05/03/15 15:28, Sergei Meshveliani wrote:
> People,
> I have a function of the kind
>
>    foo : MS -> ...
>    foo (cons1 (cons2 ps _) _) =  ...
>
> which is implemented by recursion by  ps : List Pair
>
> contained under the two data constructors:  (cons1 (cons2 ps _) _).
>
> And  Agda 2.4.2.2  reports of _failed termination_ for  foo.
>
> I can fix this by copying  ps  to an additional argument used as a
> counter for termination.
>
> But before this, I tried   --termination-depth=4.
> And this does not help.
>
> 1) Is this option for this case?
> 2) Where it is explained in the docs the "sized types" feature?
>
> Thanks,
>
> ------
> Sergei
>
> _______________________________________________
> Agda mailing list
> Agda at lists.chalmers.se
> https://lists.chalmers.se/mailman/listinfo/agda



More information about the Agda mailing list