@@ -25,9 +25,18 @@ object trace extends TraceSyntax {
2525abstract class TraceSyntax {
2626 val isForced : Boolean
2727
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 =
2830 inline def onDebug [TD ](question : => String )(op : => TD )(implicit ctx : Context ): TD =
2931 conditionally(ctx.settings.YdebugTrace .value, question, false )(op)
3032
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
3140 inline def conditionally [TC ](cond : Boolean , question : => String , show : Boolean )(op : => TC )(implicit ctx : Context ): TC =
3241 inline if (isForced || Config .tracingEnabled) {
3342 def op1 = op
@@ -36,6 +45,13 @@ abstract class TraceSyntax {
3645 }
3746 else op
3847
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
3955 inline def apply [T ](question : => String , printer : Printers .Printer , showOp : Any => String )(op : => T )(implicit ctx : Context ): T =
4056 inline if (isForced || Config .tracingEnabled) {
4157 def op1 = op
@@ -44,6 +60,13 @@ abstract class TraceSyntax {
4460 }
4561 else op
4662
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
4770 inline def apply [T ](question : => String , printer : Printers .Printer , show : Boolean )(op : => T )(implicit ctx : Context ): T =
4871 inline if (isForced || Config .tracingEnabled) {
4972 def op1 = op
@@ -52,12 +75,18 @@ abstract class TraceSyntax {
5275 }
5376 else op
5477
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 =
5580 inline def apply [T ](question : => String , printer : Printers .Printer )(op : => T )(implicit ctx : Context ): T =
5681 apply[T ](question, printer, false )(op)
5782
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 =
5885 inline def apply [T ](question : => String , show : Boolean )(op : => T )(implicit ctx : Context ): T =
5986 apply[T ](question, Printers .default, show)(op)
6087
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 =
6190 inline def apply [T ](question : => String )(op : => T )(implicit ctx : Context ): T =
6291 apply[T ](question, Printers .default, false )(op)
6392
0 commit comments