File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ abstract class Liftable[T] {
13
13
* gives an alternative implementation using just the basic staging system.
14
14
*/
15
15
object Liftable {
16
- implicit def IntIsLiftable : Liftable [Int ] = (x : Int ) => new ValueExpr (x)
17
16
implicit def BooleanIsLiftable : Liftable [Boolean ] = (x : Boolean ) => new ValueExpr (x)
17
+ implicit def ByteLiftable : Liftable [Byte ] = (x : Byte ) => new ValueExpr (x)
18
+ implicit def CharIsLiftable : Liftable [Char ] = (x : Char ) => new ValueExpr (x)
19
+ implicit def ShortIsLiftable : Liftable [Short ] = (x : Short ) => new ValueExpr (x)
20
+ implicit def IntIsLiftable : Liftable [Int ] = (x : Int ) => new ValueExpr (x)
21
+ implicit def LongIsLiftable : Liftable [Long ] = (x : Long ) => new ValueExpr (x)
22
+ implicit def FloatIsLiftable : Liftable [Float ] = (x : Float ) => new ValueExpr (x)
23
+ implicit def DoubleIsLiftable : Liftable [Double ] = (x : Double ) => new ValueExpr (x)
18
24
}
Original file line number Diff line number Diff line change @@ -24,5 +24,14 @@ object Test {
24
24
}
25
25
}
26
26
27
+ (true : Expr [Boolean ])
28
+ (1 : Expr [Byte ])
29
+ ('a' : Expr [Char ])
30
+ (1 : Expr [Short ])
31
+ (1 : Expr [Int ])
32
+ (1L : Expr [Long ])
33
+ (1.0f : Expr [Float ])
34
+ (1.0 : Expr [Double ])
35
+
27
36
val xs : Expr [List [Int ]] = 1 :: 2 :: 3 :: Nil
28
37
}
You can’t perform that action at this time.
0 commit comments