Skip to content
Browse files

Give good signatures for the binary protos, fixes arity-2-or-more.t

  • Loading branch information...
1 parent 98bb415 commit 9d10d16d0dd5d16a89c648bffd87087bceb24adc @sorear committed May 26, 2012
Showing with 24 additions and 24 deletions.
  1. +24 −24 lib/CORE.setting
View
48 lib/CORE.setting
@@ -51,19 +51,19 @@ my class KeyBag { ... }
grammar Niecza::NumSyntax { ... }
# }}}
# Important inlinable definitions {{{
-proto infix:<+>(|) is pure is Niecza::builtin('plus',2,2) {*}
+proto infix:<+>($?,$?) is pure is Niecza::builtin('plus',2,2) {*}
multi infix:<+>($l,$r) { $l + $r }
-proto infix:<->(|) is pure is Niecza::builtin('minus',2,2) {*}
+proto infix:<->($?,$?) is pure is Niecza::builtin('minus',2,2) {*}
multi infix:<->($l,$r) { $l - $r }
-proto infix:<*> is pure is Niecza::builtin('mul',2,2) is Niecza::absprec<u=> (|) {*}
+proto infix:<*> is pure is Niecza::builtin('mul',2,2) is Niecza::absprec<u=> ($?,$?) {*}
multi infix:<*>($l,$r) { $l * $r }
-proto infix:</> is pure is Niecza::builtin('divide',2,2) is equiv<*> (|) {*}
+proto infix:</> is pure is Niecza::builtin('divide',2,2) is equiv<*> ($?,$?) {*}
multi infix:</>($l,$r) { $l / $r }
-proto infix:<%> is pure is Niecza::builtin('mod',2,2) is equiv<*> (|) {*}
+proto infix:<%> is pure is Niecza::builtin('mod',2,2) is equiv<*> ($?,$?) {*}
multi infix:<%>($l,$r) { $l % $r }
-proto infix:<**> is pure is Niecza::builtin('pow',2,2) is Niecza::absprec<w= right> (|) {*}
+proto infix:<**> is pure is Niecza::builtin('pow',2,2) is Niecza::absprec<w= right> ($?,$?) {*}
multi infix:<**>($l,$r) { $l ** $r }
# sub infix:<gcd>($l,$r) is Niecza::builtin('gcd',2,2) { $l gcd $r }
@@ -104,17 +104,17 @@ sub none (*@p) is pure { none @p }
sub one (*@p) is pure { one @p }
sub any (*@p) is pure { any @p }
-proto infix:<< == >>(|) is pure is Niecza::builtin('numeq',2,2)
+proto infix:<< == >>($?,$?) is pure is Niecza::builtin('numeq',2,2)
is Niecza::absprec<m= chain> is diffy is iffy {*}
-proto infix:<< != >>(|) is pure is Niecza::builtin('numne',2,2)
+proto infix:<< != >>($?,$?) is pure is Niecza::builtin('numne',2,2)
is equiv<==> {*}
-proto infix:<< < >>(|) is pure is Niecza::builtin('numlt',2,2)
+proto infix:<< < >>($?,$?) is pure is Niecza::builtin('numlt',2,2)
is equiv<==> {*}
-proto infix:<< > >>(|) is pure is Niecza::builtin('numgt',2,2)
+proto infix:<< > >>($?,$?) is pure is Niecza::builtin('numgt',2,2)
is equiv<==> {*}
-proto infix:<< <= >>(|) is pure is Niecza::builtin('numle',2,2)
+proto infix:<< <= >>($?,$?) is pure is Niecza::builtin('numle',2,2)
is equiv<==> {*}
-proto infix:<< >= >>(|) is pure is Niecza::builtin('numge',2,2)
+proto infix:<< >= >>($?,$?) is pure is Niecza::builtin('numge',2,2)
is equiv<==> {*}
multi infix:<< == >>($l,$r) { $l == $r }
@@ -124,12 +124,12 @@ multi infix:<< > >>($l,$r) { $l > $r }
multi infix:<< <= >>($l,$r) { $l <= $r }
multi infix:<< >= >>($l,$r) { $l >= $r }
-proto infix:<ge>(|) is Niecza::builtin('strge',2,2) is equiv<==> is pure {*}
-proto infix:<gt>(|) is Niecza::builtin('strgt',2,2) is equiv<==> is pure {*}
-proto infix:<le>(|) is Niecza::builtin('strle',2,2) is equiv<==> is pure {*}
-proto infix:<lt>(|) is Niecza::builtin('strlt',2,2) is equiv<==> is pure {*}
-proto infix:<eq>(|) is Niecza::builtin('streq',2,2) is equiv<==> is pure {*}
-proto infix:<ne>(|) is Niecza::builtin('strne',2,2) is equiv<==> is pure {*}
+proto infix:<ge>($?,$?) is Niecza::builtin('strge',2,2) is equiv<==> is pure {*}
+proto infix:<gt>($?,$?) is Niecza::builtin('strgt',2,2) is equiv<==> is pure {*}
+proto infix:<le>($?,$?) is Niecza::builtin('strle',2,2) is equiv<==> is pure {*}
+proto infix:<lt>($?,$?) is Niecza::builtin('strlt',2,2) is equiv<==> is pure {*}
+proto infix:<eq>($?,$?) is Niecza::builtin('streq',2,2) is equiv<==> is pure {*}
+proto infix:<ne>($?,$?) is Niecza::builtin('strne',2,2) is equiv<==> is pure {*}
multi infix:<ge>($s1, $s2) { $s1 ge $s2 }
multi infix:<gt>($s1, $s2) { $s1 gt $s2 }
@@ -139,7 +139,7 @@ multi infix:<eq>($s1, $s2) { $s1 eq $s2 }
multi infix:<ne>(\s1, \s2) { s1 ne s2 } # Needs special handling of junctions
sub infix:<,> is Niecza::builtin('comma',0) is pure is Niecza::absprec<g= list> (\|$t) { Q:CgOp { (newrwlistvar (@ {$t})) }; }
-proto infix:<=>(|) is Niecza::absprec<i= right> is Niecza::builtin('assign',2,2) {*}
+proto infix:<=>($?,$?) is Niecza::absprec<i= right> is Niecza::builtin('assign',2,2) {*}
multi infix:<=>(\a, \b) { a = b }
sub chars($str) is pure is Niecza::builtin('chars',1,1) { chars($str) }
@@ -156,12 +156,12 @@ sub prefix:<!>(\v) is pure is Niecza::builtin('not', 1, 1) { !v }
sub not(\v) is pure is Niecza::builtin('not', 1, 1) { not(v) }
sub so(\v) is pure is Niecza::builtin('asbool', 1, 1) { so v }
-proto infix:<+&> is pure is Niecza::builtin('numand',2,2) is equiv<*> (|) {*}
-proto infix:<+|>(|) is pure is Niecza::builtin('numor',2,2) {*}
-proto infix:<+^>(|) is pure is Niecza::builtin('numxor',2,2) {*}
-proto infix:<< +< >>(|) is equiv<*> is pure
+proto infix:<+&> is pure is Niecza::builtin('numand',2,2) is equiv<*> ($?,$?) {*}
+proto infix:<+|>($?,$?) is pure is Niecza::builtin('numor',2,2) {*}
+proto infix:<+^>($?,$?) is pure is Niecza::builtin('numxor',2,2) {*}
+proto infix:<< +< >>($?,$?) is equiv<*> is pure
is Niecza::builtin('numlshift',2,2) {*}
-proto infix:<< +> >>(|) is equiv<*> is pure
+proto infix:<< +> >>($?,$?) is equiv<*> is pure
is Niecza::builtin('numrshift',2,2) {*}
proto prefix:<< +^ >>(|) is Niecza::builtin('numcompl',1,1) is pure {*}

0 comments on commit 9d10d16

Please sign in to comment.
Something went wrong with that request. Please try again.