no.kodeworks.kvarg.util.ShapeUtil.scala Maven / Gradle / Ivy
package no.kodeworks.kvarg.util
import shapeless.{::, HList, HNil}
final class Nulls[Nullable <: HList](nullable: Nullable) {
def apply(): Nullable = nullable
}
object Nulls {
def apply[Nullable <: HList](implicit nulls: Nulls[Nullable]): nulls.type = nulls
implicit def nullsHNil: Nulls[HNil] = new Nulls(HNil)
implicit def nullsHCons[H, T <: HList](implicit t: Nulls[T]): Nulls[H :: T] =
new Nulls(null.asInstanceOf[H] :: t())
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy