Hi Hongwei, On Sun, Jun 12, 2016 at 9:38 PM, gmhwxi <[email protected]> wrote: >>>val () = if true then chEvtBroadcastI (pss | inserted_event_p) > > The system does not know what type should be given to pss. You > need state type annotation: > > https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/ats-lang-users/WfatF27cyDc
Sorry. I can't imagine how to apply the state type annotation to my situation... Could you show more detail in the example? > if chEvtBroachcastI does not change the type of pss, you may just do > > prval pss2 = pss > val () = if true then chEvtBroadcastI (pss2 | inserted_event_p) > ... > prval () = (pss := pss2) Your code is type-checked. However, why is renaming pss needed? I think simple renaming is not hint for ATS2 compiler... 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/CAEvX6dkHzwLbndxjYFmSa%3Dkn0KY38_f6NrFywnmsFxBn4xnVcw%40mail.gmail.com.
