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

yka.tasks-core_2.13.3.0.0-M13.source-code.MacroCalls.scala Maven / Gradle / Ivy

package tasks

import scala.language.experimental.macros
import tasks.queue._
import cats.effect.IO
trait MacroCalls {
  def Task[A <: AnyRef, C](taskID: String, taskVersion: Int)(
      comp: A => ComputationEnvironment => IO[C]
  ): TaskDefinition[A, C] =
    macro TaskDefinitionMacros
      .taskDefinitionFromTree[A, C]

  def spore[A, B](value: A => B): Spore[A, B] =
    macro tasks.queue.SporeMacros
      .sporeImpl[A, B]

  def spore[B](value: () => B): Spore[Unit, B] =
    macro tasks.queue.SporeMacros
      .sporeImpl0[B]

  def makeSerDe[A]: SerDe[A] = macro SerdeMacro.create[A]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy