The first attempt actually works. I unfortunately had a println! $myfunction
in the file that caused this issue. Sorry for the noise. On Thursday, August 31, 2017 at 11:24:20 AM UTC-5, aditya siram wrote: > > I also tried doing it in one shot: > 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) > > and now I get: > foo.dats:21:1: a termination metric is missing > > > > > On Thursday, August 31, 2017 at 11:12:42 AM UTC-5, aditya siram wrote: >> >> Hi, >> I'm trying to delegate my pointer setting function to `aptr_set_elt`. I >> just copied the source from `pointer.sats/pointer.dats` and delegated for >> the implementation: >> >> 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) >> >> >> When I try to compile I get an error from the generated C code about a >> failed assertion: >> >> patscc -D_GNU_SOURCE -DATS_MEMALLOC_LIBC -I${PATSHOME}/contrib -o >> foo_dats foo.dats -latslib -g |& pats-filter >> >> >> exit(ATS): [assert] failed: >> /home/hwxi/Research/ATS-Postiats/src/pats_ccomp_dynexp.dats: >> 20471(line=893, offs=16) -- 20487(line=893, offs=32) >> >> Any idea what I'm doing wrong here? >> Thanks! >> >> -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscr...@googlegroups.com. To post to this group, send email to ats-lang-users@googlegroups.com. Visit this group at https://groups.google.com/group/ats-lang-users. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/37b8d220-0a30-4440-a545-28edd7123616%40googlegroups.com.