All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.kodeworks.kvarg.util.ShapeUtil.scala Maven / Gradle / Ivy

There is a newer version: 0.7
Show newest version
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