@@ -25,9 +25,18 @@ object trace extends TraceSyntax {
25
25
abstract class TraceSyntax {
26
26
val isForced : Boolean
27
27
28
+ // FIXME Use this signature after reference compiler is updated
29
+ // inline def onDebug[TD](inline question: String)(inline op: TD)(implicit ctx: Context): TD =
28
30
inline def onDebug [TD ](question : => String )(op : => TD )(implicit ctx : Context ): TD =
29
31
conditionally(ctx.settings.YdebugTrace .value, question, false )(op)
30
32
33
+ // FIXME Use this implementation after reference compiler is updated
34
+ // inline def conditionally[TC](inline cond: Boolean, inline question: String, inline show: Boolean)(op: => TC)(implicit ctx: Context): TC =
35
+ // inline if (isForced || Config.tracingEnabled) {
36
+ // if (cond) apply[TC](question, Printers.default, show)(op)
37
+ // else op
38
+ // }
39
+ // else op
31
40
inline def conditionally [TC ](cond : Boolean , question : => String , show : Boolean )(op : => TC )(implicit ctx : Context ): TC =
32
41
inline if (isForced || Config .tracingEnabled) {
33
42
def op1 = op
@@ -36,6 +45,13 @@ abstract class TraceSyntax {
36
45
}
37
46
else op
38
47
48
+ // FIXME Use this implementation after reference compiler is updated
49
+ // inline def apply[T](inline question: String, inline printer: Printers.Printer, inline showOp: Any => String)(op: => T)(implicit ctx: Context): T =
50
+ // inline if (isForced || Config.tracingEnabled) {
51
+ // if (!isForced && printer.eq(config.Printers.noPrinter)) op
52
+ // else doTrace[T](question, printer, showOp)(op)
53
+ // }
54
+ // else op
39
55
inline def apply [T ](question : => String , printer : Printers .Printer , showOp : Any => String )(op : => T )(implicit ctx : Context ): T =
40
56
inline if (isForced || Config .tracingEnabled) {
41
57
def op1 = op
@@ -44,6 +60,13 @@ abstract class TraceSyntax {
44
60
}
45
61
else op
46
62
63
+ // FIXME Use this implementation after reference compiler is updated
64
+ // inline def apply[T](inline question: String, inline printer: Printers.Printer, inline show: Boolean)(op: => T)(implicit ctx: Context): T =
65
+ // inline if (isForced || Config.tracingEnabled) {
66
+ // if (!isForced && printer.eq(config.Printers.noPrinter)) op
67
+ // else doTrace[T](question, printer, if (show) showShowable(_) else alwaysToString)(op)
68
+ // }
69
+ // else op
47
70
inline def apply [T ](question : => String , printer : Printers .Printer , show : Boolean )(op : => T )(implicit ctx : Context ): T =
48
71
inline if (isForced || Config .tracingEnabled) {
49
72
def op1 = op
@@ -52,12 +75,18 @@ abstract class TraceSyntax {
52
75
}
53
76
else op
54
77
78
+ // FIXME Use this signature after reference compiler is updated
79
+ // inline def apply[T](inline question: String, inline printer: Printers.Printer)(inline op: T)(implicit ctx: Context): T =
55
80
inline def apply [T ](question : => String , printer : Printers .Printer )(op : => T )(implicit ctx : Context ): T =
56
81
apply[T ](question, printer, false )(op)
57
82
83
+ // FIXME Use this signature after reference compiler is updated
84
+ // inline def apply[T](inline question: String, inline show: Boolean)(inline op: T)(implicit ctx: Context): T =
58
85
inline def apply [T ](question : => String , show : Boolean )(op : => T )(implicit ctx : Context ): T =
59
86
apply[T ](question, Printers .default, show)(op)
60
87
88
+ // FIXME Use this signature after reference compiler is updated
89
+ // inline def apply[T](inline question: String)(inline op: T)(implicit ctx: Context): T =
61
90
inline def apply [T ](question : => String )(op : => T )(implicit ctx : Context ): T =
62
91
apply[T ](question, Printers .default, false )(op)
63
92
0 commit comments