Luke Palmer wrote:
And how do I explicitly define the precedence?
Using the `tighter`, `looser`, and `equiv` traits.  You specify
precedence in terms of the precedence of other existing ops.
    sub infix:<.>(&f, &g) is looser(&infix:<+>) {...}

This is interesting. So, infix:< > is similar to Haskell's () circumfix operator, like ((+) 1 2) â (1 + 2).

Which method does &infix:<+> refer to, if you have;

 multi sub infix:<+>(Num $i, Num $j) { $i.add($j) }
 multi sub infix:<+>(Set $i, Set $j) { $i.union($j) }

?

Are these automatically locked to the same level, in fact, does it
make sense for any 'operator' (ie, the sub's short name) to exist
in multiple precedence levels at once?

Or is it simply a major ParseF*** to have to determine precedence
/after/ determining types of operands?

Sam.

Reply via email to