turbolift.internals.engine.Misc.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of turbolift-core_3 Show documentation
Show all versions of turbolift-core_3 Show documentation
Algebraic Effects for Scala 3
The newest version!
package turbolift.internals.engine
import turbolift.!!
import turbolift.io.{Outcome, Exceptions}
import turbolift.internals.engine.concurrent.{FiberImpl, WarpImpl}
//@#@
// export Misc._
private[engine] object Misc:
type AnyComp = Any !! Any
type Owner = FiberImpl | WarpImpl | AnyCallback
type AnyCallback = Outcome[Any] => Unit
def panic(msg: String): Nothing = throw new Exceptions.Panic(msg)
def impossible: Nothing = panic("impossible happened")