Scalax
|
|
scalax/rules/Rule.scala
]
trait
Rule[-In, +Out, +A, +X]
extends
(In) => Result[Out, A, X]Value Summary | |
abstract val
|
factory : Rules |
Method Summary | |
def
|
!^
[Y](fx2y : (X) => Y) : Rule[In, Out, A, Y]
Maps an Error
|
def
|
- [In2 <: In](exclude : => Rule[In2, Any, Any, Any]) : Rule[In2, Out, A, X] |
def
|
-^ [B](b : B) : Rule[In, Out, B, X] |
def
|
-~ [Out2, B, X2 >: X](next : => Rule[Out, Out2, B, X2]) : Rule[In, Out2, B, X2] |
def
|
-~! [Out2, B, X2 >: X](next : => Rule[Out, Out2, B, X2]) : Rule[In, Out2, B, Any] |
def
|
<~:
[InPrev, B, X2 >: X](prev : => Rule[InPrev, In, (A) => B, X2]) : Rule[InPrev, Out, B, X2]
Apply the result of this rule to the function returned by the previous rule
|
def
|
>-> [Out2, B, X2 >: X](fa2resultb : (A) => Result[Out2, B, X2]) : Rule[In, Out2, B, X2] |
def
|
>> [Out2, B, X2 >: X](fa2ruleb : (A) => (Out) => Result[Out2, B, X2]) : Rule[In, Out2, B, X2] |
def
|
>>? [Out2, B, X2 >: X](pf : scala.PartialFunction[A, Rule[Out, Out2, B, X2]]) : Rule[In, Out2, B, X2] |
def
|
>~>
[Out2, B1, B2, B >: A, C, X2 >: X](f : (B1, B2) => (Out) => Result[Out2, C, X2])(implicit view$7 : (B) => ~[B1, B2]) : Rule[In, Out2, C, X2]
>~>(f) is equivalent to >> { case b1 ~ b2 => f(b1, b2) }
|
def
|
?? (pf : scala.PartialFunction[A, Any]) : Rule[In, Out, A, X] |
def
|
^-^
[B1, B2 >: A, C](f : (B1, B2) => C) : Rule[In, Out, (B1) => C, X]
^-^(f) is equivalent to ^^ { b2 => b1 => f(b1, b2) }
|
def
|
^^ [B](fa2b : (A) => B) : Rule[In, Out, B, X] |
def
|
^^? [B](pf : scala.PartialFunction[A, B]) : Rule[In, Out, B, X] |
def
|
^~>~^
[B1, B2, B3, B >: A, C](f : (B1, B2, B3) => C)(implicit view$8 : (B) => ~[B2, B3]) : Rule[In, Out, (B1) => C, X]
^~>~^(f) is equivalent to ^^ { case b2 ~ b3 => b1 => f(b1, b2, b3) }
|
def
|
^~^
[B1, B2, B >: A, C](f : (B1, B2) => C)(implicit view$1 : (B) => ~[B1, B2]) : Rule[In, Out, C, X]
^~^(f) is equivalent to ^^ { case b1 ~ b2 => f(b1, b2) }
|
def
|
^~~^
[B1, B2, B3, B >: A, C](f : (B1, B2, B3) => C)(implicit view$2 : (B) => ~[~[B1, B2], B3]) : Rule[In, Out, C, X]
^~~^(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 => f(b1, b2, b3) }
|
def
|
^~~~^
[B1, B2, B3, B4, B >: A, C](f : (B1, B2, B3, B4) => C)(implicit view$3 : (B) => ~[~[~[B1, B2], B3], B4]) : Rule[In, Out, C, X]
^~~~^(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 => f(b1, b2, b3, b4) }
|
def
|
^~~~~^
[B1, B2, B3, B4, B5, B >: A, C](f : (B1, B2, B3, B4, B5) => C)(implicit view$4 : (B) => ~[~[~[~[B1, B2], B3], B4], B5]) : Rule[In, Out, C, X]
^~~~~^(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 => f(b1, b2, b3, b4, b5) }
|
def
|
^~~~~~^
[B1, B2, B3, B4, B5, B6, B >: A, C](f : (B1, B2, B3, B4, B5, B6) => C)(implicit view$5 : (B) => ~[~[~[~[~[B1, B2], B3], B4], B5], B6]) : Rule[In, Out, C, X]
^~~~~~^(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 ~ b6 => f(b1, b2, b3, b4, b5, b6) }
|
def
|
^~~~~~~^
[B1, B2, B3, B4, B5, B6, B7, B >: A, C](f : (B1, B2, B3, B4, B5, B6, B7) => C)(implicit view$6 : (B) => ~[~[~[~[~[~[B1, B2], B3], B4], B5], B6], B7]) : Rule[In, Out, C, X]
^~~~~~~^(f) is equivalent to ^^ { case b1 ~ b2 ~ b3 ~ b4 ~ b5 ~ b6 => f(b1, b2, b3, b4, b5, b6) }
|
def
|
as
(name : java.lang.String) : Rule[In, Out, A, X] with Name
|
def
|
filter (f : (A) => Boolean) : Rule[In, Out, A, X] |
def
|
flatMap [Out2, B, X2 >: X](fa2ruleb : (A) => (Out) => Result[Out2, B, X2]) : Rule[In, Out2, B, X2] |
def
|
map [B](fa2b : (A) => B) : Rule[In, Out, B, X] |
def
|
mapResult [Out2, B, Y](f : (Result[Out, A, X]) => Result[Out2, B, Y]) : Rule[In, Out2, B, Y] |
def
|
orError : Rule[In, Out, A, Any] |
def
|
thunk (in : In) : Thunk[In, Out, A, X] |
def
|
~ [Out2, B, X2 >: X](next : => Rule[Out, Out2, B, X2]) : Rule[In, Out2, ~[A, B], X2] |
def
|
~! [Out2, B, X2 >: X](next : => Rule[Out, Out2, B, X2]) : Rule[In, Out2, ~[A, B], Any] |
def
|
~++ [Out2, B >: A, X2 >: X](next : => Rule[Out, Out2, scala.Seq[B], X2]) : Rule[In, Out2, scala.List[B], X2] |
def
|
~- [Out2, B, X2 >: X](next : => Rule[Out, Out2, B, X2]) : Rule[In, Out2, A, X2] |
def
|
~-! [Out2, B, X2 >: X](next : => Rule[Out, Out2, B, X2]) : Rule[In, Out2, A, Any] |
def
|
~>
[Out2, B, X2 >: X](next : => Rule[Out, Out2, (A) => B, X2]) : Rule[In, Out2, B, X2]
Apply the result of this rule to the function returned by the next rule
|
Methods inherited from scala.Function1 | |
scala.Function1.apply (abstract), scala.Function1.toString, scala.Function1.compose, scala.Function1.andThen |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Value Details |
Method Details |
def
flatMap[Out2, B, X2 >: X](fa2ruleb : (A) => (Out) => Result[Out2, B, X2]) : Rule[In, Out2, B, X2]
def
>>?[Out2, B, X2 >: X](pf : scala.PartialFunction[A, Rule[Out, Out2, B, X2]]) : Rule[In, Out2, B, X2]
def
~++[Out2, B >: A, X2 >: X](next : => Rule[Out, Out2, scala.Seq[B], X2]) : Rule[In, Out2, scala.List[B], X2]
def
^~^[B1, B2, B >: A, C](f : (B1, B2) => C)(implicit
view$1 : (B) => ~[B1, B2]) : Rule[In, Out, C, X]
def
^~~^[B1, B2, B3, B >: A, C](f : (B1, B2, B3) => C)(implicit
view$2 : (B) => ~[~[B1, B2], B3]) : Rule[In, Out, C, X]
def
^~~~^[B1, B2, B3, B4, B >: A, C](f : (B1, B2, B3, B4) => C)(implicit
view$3 : (B) => ~[~[~[B1, B2], B3], B4]) : Rule[In, Out, C, X]
def
^~~~~^[B1, B2, B3, B4, B5, B >: A, C](f : (B1, B2, B3, B4, B5) => C)(implicit
view$4 : (B) => ~[~[~[~[B1, B2], B3], B4], B5]) : Rule[In, Out, C, X]
def
^~~~~~^[B1, B2, B3, B4, B5, B6, B >: A, C](f : (B1, B2, B3, B4, B5, B6) => C)(implicit
view$5 : (B) => ~[~[~[~[~[B1, B2], B3], B4], B5], B6]) : Rule[In, Out, C, X]
def
^~~~~~~^[B1, B2, B3, B4, B5, B6, B7, B >: A, C](f : (B1, B2, B3, B4, B5, B6, B7) => C)(implicit
view$6 : (B) => ~[~[~[~[~[~[B1, B2], B3], B4], B5], B6], B7]) : Rule[In, Out, C, X]
def
>~>[Out2, B1, B2, B >: A, C, X2 >: X](f : (B1, B2) => (Out) => Result[Out2, C, X2])(implicit
view$7 : (B) => ~[B1, B2]) : Rule[In, Out2, C, X2]
def
^~>~^[B1, B2, B3, B >: A, C](f : (B1, B2, B3) => C)(implicit
view$8 : (B) => ~[B2, B3]) : Rule[In, Out, (B1) => C, X]
Scalax
|
|