Hi all,
I have a simple program that fills a list with a bunch of characters and a 
driver:
#include "share/atspre_staload.hats"

fun {t:t0p} fill_list
  {n:nat}
  (
    size:ssize_t n,
    c: t
  ): list_vt(t,n) =
  let
    fun loop
      {i:nat | i <= n}
      .<i>.
      (
        size : ssize_t i,
        c: t,
        res: list_vt(t, n-i)
      ): list_vt(t,n) =
      if (size = i2ssz(0))
      then res
      else loop(pred size, c, list_vt_cons(c,res))
  in
    loop(size,c,list_vt_nil())
  end

implement main0(argc, argv) =
  let
    val x = fill_list(i2ssz(10), 'x')
  in
    begin
      println! (" testing: ", x);
      list_vt_free(x)
    end
  end

Running this should print 10 'x's instead I get:
> patscc -g -D_GNU_SOURCE -DATS_MEMALLOC_LIBC -g -I/home/deech/Downloads/ATS
/ATS2/contrib -o xs xs.dats -latslib

In file included from xs_dats.c:15:0:
xs_dats.c: In function ‘ATSLIB_056_prelude__fprint_val__31__1’:
xs_dats.c:2292:22: error: ‘PMVtmpltcstmat’ undeclared (first use in this 
function)
ATSINSmove(tmp60__1, PMVtmpltcstmat[0](tostrptr_val<[1]>)(arg1)) ;
[1]: S2EVar(5259)
^
/home/deech/Downloads/ATS/ATS2/ccomp/runtime/pats_ccomp_instrset.h:276:37: 
note: in definition of macro ‘ATSINSmove’
#define ATSINSmove(tmp, val) (tmp = val)
^~~
xs_dats.c:2292:22: note: each undeclared identifier is reported only once 
for each function it appears in
ATSINSmove(tmp60__1, PMVtmpltcstmat[0](tostrptr_val<[1]>)(arg1)) ;
[1]: S2EVar(5259)
 

Any idea what I'm doing wrong?
Thanks!
-deech

-- 
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/f53efa09-3260-46b2-b915-e7859d167d88%40googlegroups.com.

Reply via email to