
tofu.generate.GenUUIDInstances.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tofu-kernel_3 Show documentation
Show all versions of tofu-kernel_3 Show documentation
Opinionated set of tools for functional programming in Scala
package tofu.generate
import cats.~>
import tofu.higherKind.{RepresentableK, RepK}
import java.util.UUID
trait GenUUIDInstances {
// TODO: use higherKind.derived macro when it is ready for scala 3
given genUUIDRepresentableK: RepresentableK[GenUUID] = new RepresentableK[GenUUID] {
def tabulate[F[_]](hom: RepK[GenUUID, _] ~> F): GenUUID[F] = new GenUUID[F] {
def randomUUID: F[UUID] = hom(RepK[GenUUID](_.randomUUID))
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy