Fun{a:t@ype} add(f: a,g: a) :a = f + g error

Hi

fun{a:t@ype} add(f: a,g: a) :a = f + g

This program is in error.
Please tell me how to resolve.

Thanks, Sakurai Hiroshi.

Thank you.
I can do it.
I cannot think about a gadd_val !!
Why doesn’t ATS work + operator ?

2015年1月13日火曜日 18時28分17秒 UTC+9 gmhwxi:

How about this:

fun{a:t@ype} add(f: a, g: a) :a = gadd_val(f, g)On Tue, Jan 13, 2015 at 4:22 AM, Hiroshi Sakurai sakur...@gmail.com wrote:

Hi

fun{a:t@ype} add(f: a,g: a) :a = f + g

This program is in error.
Please tell me how to resolve.

Thanks, Sakurai Hiroshi.


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-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/6fc4ed28-2a1e-424f-a702-ab029d4c9b57%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/6fc4ed28-2a1e-424f-a702-ab029d4c9b57%40googlegroups.com?utm_medium=email&utm_source=footer
.

  • is for addition on fixed types: int, double, etc.On Tuesday, January 13, 2015 at 7:37:19 PM UTC-5, Hiroshi Sakurai wrote:

Thank you.
I can do it.
I cannot think about a gadd_val !!
Why doesn’t ATS work + operator ?

2015年1月13日火曜日 18時28分17秒 UTC+9 gmhwxi:

How about this:

fun{a:t@ype} add(f: a, g: a) :a = gadd_val(f, g)

On Tue, Jan 13, 2015 at 4:22 AM, Hiroshi Sakurai saku...@gmail.com wrote:

Hi

fun{a:t@ype} add(f: a,g: a) :a = f + g

This program is in error.
Please tell me how to resolve.

Thanks, Sakurai Hiroshi.


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...@googlegroups.com.
To post to this group, send email to ats-l...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/6fc4ed28-2a1e-424f-a702-ab029d4c9b57%40googlegroups.com
https://groups.google.com/d/msgid/ats-lang-users/6fc4ed28-2a1e-424f-a702-ab029d4c9b57%40googlegroups.com?utm_medium=email&utm_source=footer
.