From af353894851ae0f948c5518603039a52095e11ca Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Wed, 28 Feb 2018 00:40:04 +0100 Subject: [PATCH] Make sure all set ops have an "is pure" on their proto only --- src/core/set_elem.pm | 16 ++++++++-------- src/core/set_precedes.pm | 12 ++++++------ src/core/set_proper_subset.pm | 16 ++++++++-------- src/core/set_subset.pm | 16 ++++++++-------- src/core/set_symmetric_difference.pm | 2 +- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/core/set_elem.pm b/src/core/set_elem.pm index 9e74d2478d6..20f5306d9f5 100644 --- a/src/core/set_elem.pm +++ b/src/core/set_elem.pm @@ -73,18 +73,18 @@ multi sub infix:<(elem)>(Any $a, Any $b) { infix:<(elem)>($a,$b.Set) } my constant &infix:<∈> := &infix:<(elem)>; # U+2209 NOT AN ELEMENT OF -proto sub infix:<∉>(|) {*} -multi sub infix:<∉>($a, $b --> Bool:D) is pure { not $a (elem) $b } +proto sub infix:<∉>(|) is pure {*} +multi sub infix:<∉>($a, $b --> Bool:D) { not $a (elem) $b } -proto sub infix:<(cont)>(|) {*} -multi sub infix:<(cont)>($a, $b --> Bool:D) is pure { $b (elem) $a } +proto sub infix:<(cont)>(|) is pure {*} +multi sub infix:<(cont)>($a, $b --> Bool:D) { $b (elem) $a } # U+220B CONTAINS AS MEMBER -proto sub infix:<∋>(|) {*} -multi sub infix:<∋>($a, $b --> Bool:D) is pure { $b (elem) $a } +proto sub infix:<∋>(|) is pure {*} +multi sub infix:<∋>($a, $b --> Bool:D) { $b (elem) $a } # U+220C DOES NOT CONTAIN AS MEMBER -proto sub infix:<∌>(|) {*} -multi sub infix:<∌>($a, $b --> Bool:D) is pure { not $b (elem) $a } +proto sub infix:<∌>(|) is pure {*} +multi sub infix:<∌>($a, $b --> Bool:D) { not $b (elem) $a } # vim: ft=perl6 expandtab sw=4 diff --git a/src/core/set_precedes.pm b/src/core/set_precedes.pm index 80c529209d9..5a613c159fb 100644 --- a/src/core/set_precedes.pm +++ b/src/core/set_precedes.pm @@ -107,24 +107,24 @@ multi sub infix:<<(<+)>>(Any $a, Any $b --> Bool:D) { } # U+227C PRECEDES OR EQUAL TO -proto sub infix:<≼>(|) {*} -multi sub infix:<≼>($a, $b --> Bool:D) is pure { +proto sub infix:<≼>(|) is pure {*} +multi sub infix:<≼>($a, $b --> Bool:D) { my $*WHAT = "≼"; my $*INSTEAD = "⊆"; infix:<<(<+)>>($a, $b) } # $a (>+) $b === $a R(<+) $b -proto sub infix:<<(>+)>>(|) {*} -multi sub infix:<<(>+)>>($a, $b --> Bool:D) is pure { +proto sub infix:<<(>+)>>(|) is pure {*} +multi sub infix:<<(>+)>>($a, $b --> Bool:D) { my $*WHAT = "(>+)"; my $*INSTEAD = "(>=)"; infix:<<(<+)>>($b, $a) } # U+227D SUCCEEDS OR EQUAL TO -proto sub infix:<≽>(|) {*} -multi sub infix:<≽>($a, $b --> Bool:D) is pure { +proto sub infix:<≽>(|) is pure {*} +multi sub infix:<≽>($a, $b --> Bool:D) { my $*WHAT = "≽"; my $*INSTEAD = "⊇"; infix:<<(<+)>>($b, $a) diff --git a/src/core/set_proper_subset.pm b/src/core/set_proper_subset.pm index 5c2dfcf479b..4732fc8c2c1 100644 --- a/src/core/set_proper_subset.pm +++ b/src/core/set_proper_subset.pm @@ -115,18 +115,18 @@ multi sub infix:<<(<)>>(Any $a, Any $b --> Bool:D) { my constant &infix:<⊂> := &infix:<<(<)>>; # U+2284 NOT A SUBSET OF -proto sub infix:<⊄>(|) {*} -multi sub infix:<⊄>($a, $b --> Bool:D) is pure { not $a (<) $b } +proto sub infix:<⊄>(|) is pure {*} +multi sub infix:<⊄>($a, $b --> Bool:D) { not $a (<) $b } -proto sub infix:<<(>)>>(|) {*} -multi sub infix:<<(>)>>(Any $a, Any $b --> Bool:D) is pure { $b (<) $a } +proto sub infix:<<(>)>>(|) is pure {*} +multi sub infix:<<(>)>>(Any $a, Any $b --> Bool:D) { $b (<) $a } # U+2283 SUPERSET OF -proto sub infix:<⊃>(|) {*} -multi sub infix:<⊃>($a, $b --> Bool:D) is pure { $b (<) $a } +proto sub infix:<⊃>(|) is pure {*} +multi sub infix:<⊃>($a, $b --> Bool:D) { $b (<) $a } # U+2285 NOT A SUPERSET OF -proto sub infix:<⊅>(|) {*} -multi sub infix:<⊅>($a, $b --> Bool:D) is pure { not $b (<) $a } +proto sub infix:<⊅>(|) is pure {*} +multi sub infix:<⊅>($a, $b --> Bool:D) { not $b (<) $a } # vim: ft=perl6 expandtab sw=4 diff --git a/src/core/set_subset.pm b/src/core/set_subset.pm index 03d22d39f72..2076ce44e28 100644 --- a/src/core/set_subset.pm +++ b/src/core/set_subset.pm @@ -144,18 +144,18 @@ multi sub infix:<<(<=)>>(Any $a, Any $b --> Bool:D) { my constant &infix:<⊆> := &infix:<<(<=)>>; # U+2288 NEITHER A SUBSET OF NOR EQUAL TO -proto sub infix:<⊈>(|) {*} -multi sub infix:<⊈>($a, $b --> Bool:D) is pure { not $a (<=) $b } +proto sub infix:<⊈>(|) is pure {*} +multi sub infix:<⊈>($a, $b --> Bool:D) { not $a (<=) $b } -proto sub infix:<<(>=)>>(|) {*} -multi sub infix:<<(>=)>>(Any $a, Any $b --> Bool:D) is pure { $b (<=) $a } +proto sub infix:<<(>=)>>(|) is pure {*} +multi sub infix:<<(>=)>>(Any $a, Any $b --> Bool:D) { $b (<=) $a } # U+2287 SUPERSET OF OR EQUAL TO -proto sub infix:<⊇>(|) {*} -multi sub infix:<⊇>($a, $b --> Bool:D) is pure { $b (<=) $a } +proto sub infix:<⊇>(|) is pure {*} +multi sub infix:<⊇>($a, $b --> Bool:D) { $b (<=) $a } # U+2289 NEITHER A SUPERSET OF NOR EQUAL TO -proto sub infix:<⊉>(|) {*} -multi sub infix:<⊉>($a, $b --> Bool:D) is pure { not $b (<=) $a } +proto sub infix:<⊉>(|) is pure {*} +multi sub infix:<⊉>($a, $b --> Bool:D) { not $b (<=) $a } # vim: ft=perl6 expandtab sw=4 diff --git a/src/core/set_symmetric_difference.pm b/src/core/set_symmetric_difference.pm index 9d408228694..47a1174dead 100644 --- a/src/core/set_symmetric_difference.pm +++ b/src/core/set_symmetric_difference.pm @@ -224,7 +224,7 @@ multi sub infix:<(^)>(Any $a, Any $b) { ) } -multi sub infix:<(^)>(**@p) is pure { +multi sub infix:<(^)>(**@p) { # positions / size in minmax info my constant COUNT = 0;