вт, 7 авг. 2018 г. в 8:18, Hongwei Xi <[email protected]>: > > @[int][3] is the type for a flat int array of size 3. > > Unfortunately, it is not fully supported at this point > (it can only be assigned to a var). Please use @(int, int, int) > instead. > > Are you planning to support this in ATS3?
I guess another way to solve this problem right now is to use $extype for [row]. > On Mon, Aug 6, 2018 at 7:51 PM, 'Yannick Duchêne' via ats-lang-users < > [email protected]> wrote: > >> I’m unsure if it’s something wrong with what I wrote (ex. may be it’s not >> allowed) or with Postiats. The sample below type‑checks, but compilation >> fails with an INTERROR message. >> >> The sample: >> >> typedef row = @[int][3] >> val row1:row = @[int](1, 2, 3) >> val row2:row = @[int](4, 5, 6) >> var a = @[row][2](row1, row2) >> val a12 = a[1].[2] >> >> On the second line, it fails with: >> >> > INTERROR(pats_ccomp_dynexp): hidexp_ccomp: hde0 = >> HDEarrinit(HSEapp(HSEcst(atstkind_t0ype); >> HSEs2exp(S2Eextkind(atstype_int))); HDEint(3); HDEi0nt(1); HDEi0nt(2); >> HDEi0nt(3)) >> >> >> If I try this instead: >> >> typedef row = @[int][3] >> var row1:row = @[int](1, 2, 3) >> var row2:row = @[int](4, 5, 6) >> var a = @[row][2](row1, row2) >> val a12 = a[1].[2] >> >> … Postiats can compile it, but I then I have numerous error while >> compiling C. Many of these errors mentions ATSstatmpdec and there are also >> C syntax errors. >> >> -- >> 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 [email protected]. >> To post to this group, send email to [email protected]. >> 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/9695cba1-b5c0-463e-9356-60035b1bb142%40googlegroups.com >> <https://groups.google.com/d/msgid/ats-lang-users/9695cba1-b5c0-463e-9356-60035b1bb142%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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/CAPPSPLpehPjppMhcBfqevkwuKAynk8oEjs9ytaxa0Y6_CPXSww%40mail.gmail.com > <https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLpehPjppMhcBfqevkwuKAynk8oEjs9ytaxa0Y6_CPXSww%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- Cheers, Artyom Shalkhakov -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CAKO6%3Dqj-jNhH7UmEeLRU0sfwLtnuhQzgfKrJLdKKKMUj2CZVCQ%40mail.gmail.com.
