summaryrefslogtreecommitdiff
path: root/src/scalap
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-12-22 20:11:29 +0000
committerPaul Phillips <paulp@improving.org>2009-12-22 20:11:29 +0000
commit361a7a40d35e09d7f622fcafd28531172a139e0e (patch)
tree53047ba64d5b56cc75b8b67500ad346c398437d6 /src/scalap
parentd32b5bc758e9203ed66b2517d2abc2530385c1dc (diff)
downloadscala-361a7a40d35e09d7f622fcafd28531172a139e0e.tar.gz
scala-361a7a40d35e09d7f622fcafd28531172a139e0e.tar.bz2
scala-361a7a40d35e09d7f622fcafd28531172a139e0e.zip
Took full advantage of the new =>? alias for th...
Took full advantage of the new =>? alias for the superverbosely named PartialFunction by renaming every usage of the latter except when in comments.
Diffstat (limited to 'src/scalap')
-rw-r--r--src/scalap/scala/tools/scalap/scalax/rules/Rule.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scalap/scala/tools/scalap/scalax/rules/Rule.scala b/src/scalap/scala/tools/scalap/scalax/rules/Rule.scala
index 1500b81050..f65c688aa7 100644
--- a/src/scalap/scala/tools/scalap/scalax/rules/Rule.scala
+++ b/src/scalap/scala/tools/scalap/scalax/rules/Rule.scala
@@ -56,9 +56,9 @@ trait Rule[-In, +Out, +A, +X] extends (In => Result[Out, A, X]) {
def ^^[B](fa2b : A => B) = map(fa2b)
- def ^^?[B](pf : PartialFunction[A, B]) = filter (pf.isDefinedAt(_)) ^^ pf
+ def ^^?[B](pf : A =>? B) = filter (pf.isDefinedAt(_)) ^^ pf
- def ??(pf : PartialFunction[A, Any]) = filter (pf.isDefinedAt(_))
+ def ??(pf : A =>? Any) = filter (pf.isDefinedAt(_))
def -^[B](b : B) = map { any => b }
@@ -73,7 +73,7 @@ trait Rule[-In, +Out, +A, +X] extends (In => Result[Out, A, X]) {
def >->[Out2, B, X2 >: X](fa2resultb : A => Result[Out2, B, X2]) = flatMap { a => any => fa2resultb(a) }
- def >>?[Out2, B, X2 >: X](pf : PartialFunction[A, Rule[Out, Out2, B, X2]]) = filter(pf isDefinedAt _) flatMap pf
+ def >>?[Out2, B, X2 >: X](pf : A =>? Rule[Out, Out2, B, X2]) = filter(pf isDefinedAt _) flatMap pf
def >>&[B, X2 >: X](fa2ruleb : A => Out => Result[Any, B, X2]) = flatMap { a => out => fa2ruleb(a)(out) mapOut { any => out } }