Incidentally, this works: #include "share/atspre_staload.hats"
typedef row = @(int, int, int) val row1: row = (1, 2, 3) val row2: row = (4, 5, 6) var a = @[row](row1, row2) val a12 = a[1].2 implement main0() = println!(a12) On Monday, August 6, 2018 at 6:51:51 PM UTC-5, Yannick Duchêne 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/7d1cff0f-0d00-4296-966d-1d31b02146bb%40googlegroups.com.
