harness.deriving.LazyDerived.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of harness-deriving_sjs1_3 Show documentation
Show all versions of harness-deriving_sjs1_3 Show documentation
Miscellaneous libraries/utilities for Scala.
The newest version!
package harness.deriving
final class LazyDerived[A] private (_derived: => A) {
lazy val derived: A = _derived
override def toString: String = s"LazyDerived($derived)"
}
object LazyDerived {
def apply[A](a: => A): LazyDerived[A] = new LazyDerived[A](a)
def apply[A](implicit derived: LazyDerived[A]): LazyDerived[A] = derived
type K0[F[_]] = [a] =>> LazyDerived[F[a]]
given inst[A](using a: => A): LazyDerived[A] = LazyDerived(a)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy