I see. There is a bit of subtlety here. If you write 'p0.x := y0', then the type of 'p0' is required to be non linear.
On Monday, August 22, 2016 at 11:09:24 AM UTC-4, Kiwamu Okabe wrote: > > On Tue, Aug 23, 2016 at 12:00 AM, Hongwei Xi <...> wrote: > > If 'x' is a true field name in p0, then you can use p0.x. > > If 'x' is an overloaded symbol, then you need to use p0.x() (to access) > and > > p0.x(v) (to update). > > Umm? Not make sense. > > > http://ats-lang.sourceforge.net/DOCUMENT/ATS2TUTORIAL/HTML/HTMLTOC/c260.html > > This document say: > > ``` > abstype point = ptr // boxed > extern fun point_make (x: double, y: double): point > extern fun point_set_x (p: point, x: double): void > overload .x with point_set_x > val () = p0.x := y0 // point_set_x (p0, y0) > ``` > > I think the `x` should be overloaded symbol. But above code can use > `p0.x := y0` style... > > Best regards, > -- > Kiwamu Okabe at METASEPI DESIGN > -- 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/725fbad8-7849-4bc7-b054-395ebe72f3d8%40googlegroups.com.
