-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
PolyFunction.scala
26 lines (25 loc) · 1.06 KB
/
PolyFunction.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package scala
/* (EXPERIMENTAL) NEW DOCUMENTATION: This should be used when we stabilize erased definitions or other generalize other function types.
*
* Marker trait for many (poly) function types.
*
* This trait can only be refined with a method or polymorphic method,
* as long as that method is called `apply`, e.g.:
* PolyFunction { def apply(x_1: P_1, ..., x_N: P_N): R }
* PolyFunction { def apply[T_1, ..., T_M](x_1: P_1, ..., x_N: P_N): R }
* Exactly one term argument list is expected.
* The term argument list may be contextual and each argument may be erased.
*
* This type will be erased to FunctionN or FunctionXXL.
*/
/** Marker trait for polymorphic function types.
*
* This trait can only be refined with a polymorphic method,
* as long as that method is called `apply`, e.g.:
* PolyFunction { def apply[T_1, ..., T_M](x_1: P_1, ..., x_N: P_N): R }
* Exactly one term argument list is expected.
* The term argument list may be contextual.
*
* This type will be erased to FunctionN or FunctionXXL.
*/
trait PolyFunction