-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpackage.scala
41 lines (32 loc) · 1.03 KB
/
package.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.github
import com.github.johnreedlol.conversions.{ImplicitAssert, ImplicitPrint, ImplicitTrace}
/**
* Makes Scala Trace Debug functions available via implicit conversions.
* https://github.com/JohnReedLOL/scala-trace-debug
*/
package object johnreedlol {
import scala.language.implicitConversions
/**
* Assertions fail with exit code 7
*/
protected[johnreedlol] val exitFail = 7
// Warning: implicit conversions language feature
/**
* Import this to add print functionality to the current scope
*/
implicit def implicitlyPrintable[MyType](me: MyType): ImplicitPrint[MyType] = {
new ImplicitPrint(me)
}
/**
* Import this to add trace functionality to the current scope
*/
implicit def implicitlyTraceable[MyType](me: MyType): ImplicitTrace[MyType] = {
new ImplicitTrace(me)
}
/**
* Import this to add assert functionality to the current scope
*/
implicit def implicitlyAssertable[MyType](me: MyType): ImplicitAssert[MyType] = {
new ImplicitAssert(me)
}
}