val t: x.type = 42 <console>:8: error: type mismatch; found : x.type (with underlying type Int) required: AnyRef val t: x.type = 42 ^ scala> val workaround = Witness(42) workaround: shapeless.Witness{type T = Int(42)} = fresh$macro$3$1@35b45d3f scala> val t: workaround.T = 42 t: workaround.T = 42 Even more