Following the C++ tradition, ATS uses '<' and '>' for grouping template parameters. This caused all sorts of lexical issues.
Note that '<@' is treated as a symbolic identifier. You could just drop '@' to make your code work. On Thu, Jan 3, 2019 at 7:58 AM aditya siram <aditya.si...@gmail.com> wrote: > Hi, > The following seems like a bug, a tuple template parameter can't be > parsed. The following: > > fun {a: t0p}{b : t0p} id(i : b) = i > implement main0(argc,argv) = > let > val _ = id<int><@(int,int)>((1,2)) > in > () > end > > > > generates the error: > > ... 1596(line=69, offs=19) -- 1599(line=69, offs=22): error(2): the static > identifier [><@] is unrecognized. > ... 1593(line=69, offs=16) -- 1608(line=69, offs=31): error(2): none of > the static constants referred to by [int] is applicable. > patsopt(TRANS2): there are [2] errors in total. > exit(ATS): uncaught exception: ... > > > > > But if I add a space before the '@' it works: > > implement main0(argc,argv) = > let > val _ = id<int>< @(int,int)>((1,2)) (* note the space before '@' *) > in > () > end > > > 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/d0a0a8e5-fccf-4840-af60-505e55998dcc%40googlegroups.com > <https://groups.google.com/d/msgid/ats-lang-users/d0a0a8e5-fccf-4840-af60-505e55998dcc%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 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/CAPPSPLqJdsd0t6-mnQ050BT0hUQ7Z%2Bowe11DUfOSHANisL1UzA%40mail.gmail.com.