--
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/cb04c44d-6fc2-4e8a-a8e5-78701b6c7e57%40googlegroups.com.
symintr &&
overload && with <some-function>
postfix +
overload + with <some-function>
Only functions can be overloaded.
But the function an operator symbol designates, may a polymorphic function… or it does work with polymorphic functions?
infixl 10 +
overload + with foo
infixl +
overload + with foo of 10
>> infixl 10 +
10 is the precedence of '+'.
Suppose you have an expression '1 + 2 ++ 3';
if ++ has a higher precedence, then the expression
is parsed as 1 + (2 ++ 3); if ++ has a lower precedence,
you get (1 + 2) ++ 3.
>>
overload + with foo of 10