extern fun
{a:vt0p}
my_aptr_set_elt
{l:agz}
(ap: !aptr(a?, l) >> aptr(a, l), x: a):<!wrt> void
implement
{a}
my_aptr_set_elt
(ap, x) = aptr_set_elt<a>(ap, x)
patscc -D_GNU_SOURCE -DATS_MEMALLOC_LIBC -I${PATSHOME}/contrib -o foo_dats foo.dats -latslib -g |& pats-filter
fun
{a:vt0p}
my_aptr_set_elt
{l:agz}
(ap: !aptr(a?, l) >> aptr(a, l), x: a):<!wrt> void = aptr_set_elt<a>(ap, x)
foo.dats:21:1: a termination metric is missing
println! $myfunction
Please try 'fn' instead of 'fun'.
------ Original message------
From: aditya siram
Date: Thu, Aug 31, 2017 1:24 PM
To: ats-lang-users;
Subject:Re: Function Delegation Causing Assert Failed
If use 'fun', the ntm effect (non-termination) is assumed. In your case, you only mentioned the wrt effect.
------ Original message------
From: aditya siram