mike: 4385(line=147, offs=36) -- 4406(line=147, offs=57): error(3): the dynamic expression cannot be assigned the type [S2Efun(FUN; lin=0; eff=S2EFFset(1); npf=-1; S2Ecst(hex_t), S2Ecst(hex_t); S2Ecst(uint8))].mike: 4385(line=147, offs=36) -- 4406(line=147, offs=57): error(3): mismatch of static terms (tyleq):The actual term is: S2Eapp(S2Ecst(g0uint_t0ype); S2Eextkind(atstype_uint8))The needed term is: S2Efun(FUN; lin=0; eff=S2EFFset(1); npf=-1; S2Ecst(hex_t), S2Ecst(hex_t); S2Ecst(uint8))patsopt(TRANS3): there are [1] errors in total.exit(ATS): uncaught exception: _2home_2hwxi_2Research_2ATS_2dPostiats_2src_2pats_error_2esats__FatalErrorExn(1025)
extern fun{} hex_to_byte (msn: hex_t, lsn: hex_t) : uint8implement{} hex_to_byte (msn, lsn) = let ...in ...end
extern fun hex_to_byte_(msn: hex_t, lsn: hex_t) : $d2ctype(hex_to_byte<>)implement hex_to_byte_(msn, lsn) = hex_to_byte(msn, lsn)
#define hex_to_byte hex_to_byte_>>extern fun hex_to_byte_(msn: hex_t, lsn: hex_t) : $d2ctype(hex_to_byte<>)--
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-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/c9060a56-9f54-472c-b3b1-d2d050c3161e%40googlegroups.com.
extern fun{} set_n {n0: nat | n0 >= 3 && n0 <= 127} (count: int(n0)): voidimplement{} set_n {n0} (count) = let ..in ...end
externfun set_n_ : $d2ctype(set_n<>)implement set_n_(count) = set_n(count)
#define set_n set_n_I had that originally, but failed in the C compile. It turned out that I needed: staload _ = "prelude/DATS/integer_fixed.dats"It seems that this staload is required in the file that instantiates the template, not the file that defines it. Furthermore, it appears that staload of dats file is recursive, because this load was not in the original file that instantiated. It had to pick it up from some other load.Is there some easy way such that if you staload load a dats file the proper staload dependencies come with it, and the compiler checks that you have them in the file defining the template so that anyone that reuses your code does not have to struggle to find the missing staload for its templates?