AbstractStarterKit

libretto.scaletto.AbstractStarterKit
abstract class AbstractStarterKit(val dsl: Scaletto, val bridge: Of[Scaletto], val executorFactory: Of[Scaletto, Of[Scaletto]], val executor0: (ScheduledExecutorService, Executor) => Of[Scaletto, Of[Scaletto]])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class StarterKit
object StarterKit.type

Members list

Value members

Concrete methods

def executor(blockingExecutor: Executor)(scheduler: ScheduledExecutorService): Of[Scaletto, Of[Scaletto]]
def runAsync(blueprint: Done -⚬ Done): Future[Unit]
def runScalaAsync[A](blueprint: Done -⚬ Val[A]): Future[A]

Exports

Defined exports

override val $: FunExprOps
Exported from ClosedDSL
final type $ = $
Exported from CoreDSL
final type $Ops = $Ops
Exported from CoreDSL
final val *: *.type
Exported from CoreDSL
final val **: **.type
Exported from ScalettoLib
final val +: +.type
Exported from CoreDSL
final type - = -
Exported from InvertDSL
final type -⚬ = -⚬
Exported from CoreDSL
final type =⚬ = =⚬
Exported from InvertDSL
final val ?: ?.type
Exported from CoreDSL
final type ?? = ??
Exported from InvertDSL
final val AcquiredLock: AcquiredLock.type
Exported from CoreLib
final type AcquiredLock = AcquiredLock
Exported from CoreLib
final val Affine: Affine.type
Exported from CoreDSL
final type Affine = Affine
Exported from CoreDSL
final type BiExternalizer = [F[_, _]] =>> BiExternalizer[F]
Exported from CoreLib
final val Bifunctor: Bifunctor.type
Exported from CoreLib
final type Bifunctor = [F[_, _]] =>> Bifunctor[F]
Exported from CoreLib
final val Bool: Bool.type
Exported from CoreLib
final type Bool = Bool
Exported from CoreLib
final val Closeable: Closeable.type
Exported from CoreLib
final type Closeable = Closeable
Exported from CoreLib
Exported from CoreLib
final type ClosureOps = ClosureOps
Exported from ClosedDSL
final type Comonad = [F[_]] =>> Comonad[F]
Exported from CoreLib
final val Comonoid: Comonoid.type
Exported from CoreDSL
final type Comonoid = Comonoid
Exported from CoreDSL
final type Comparable = Comparable
Exported from CoreLib
final val Compared: Compared.type
Exported from CoreLib
Exported from CoreDSL
Exported from CoreLib
final type ContraExternalizer = [F[_]] =>> ContraExternalizer[F]
Exported from CoreLib
final val ContraFunctor: ContraFunctor.type
Exported from CoreLib
final type ContraFunctor = [F[_]] =>> ContraFunctor[F]
Exported from CoreLib
final val Cosemigroup: Cosemigroup.type
Exported from CoreDSL
final type Cosemigroup = Cosemigroup
Exported from CoreDSL
final val Deferrable: Deferrable.type
Exported from CoreLib
final val Deferred: Deferred.type
Exported from CoreLib
final type Deferred = Deferred
Exported from CoreLib
final val Detained: Detained.type
Exported from CoreLib
final type Detained = Detained
Exported from CoreLib
final type Done = Done
Exported from CoreDSL
final val Dual: Dual.type
Exported from CoreLib
final type Dual = Dual
Exported from CoreLib
final type Dual1 = [F[_], G[_]] =>> Dual1[F, G]
Exported from CoreLib
final val Endless: Endless.type
Exported from CoreLib
final type Endless = Endless
Exported from CoreLib
final val Externalizer: Externalizer.type
Exported from CoreLib
final type Externalizer = [F[_]] =>> Externalizer[F]
Exported from CoreLib
final type FocusedBi = [F[_, _], B1, B2] =>> FocusedBi[F, B1, B2]
Exported from CoreLib
final type FocusedCo = [F[_], B] =>> FocusedCo[F, B]
Exported from CoreLib
final type FocusedContra = [F[_], B] =>> FocusedContra[F, B]
Exported from CoreLib
final implicit def FocusedOnChoiceCo[F[_], B1, B2](f: FocusedCo[F, B1 |&| B2]): FocusedOnChoiceCo[F, B1, B2]
Exported from CoreLib
final type FocusedOnChoiceCo = [F[_], B1, B2] =>> FocusedOnChoiceCo[F, B1, B2]
Exported from CoreLib
final implicit def FocusedOnChoiceContra[A, F[_], B1, B2](f: FocusedContra[F, B1 |&| B2]): FocusedOnChoiceContra[A, F, B1, B2]
Exported from CoreLib

Extends the focus to the left/right side of the (currently focused) consumer choice.

Extends the focus to the left/right side of the (currently focused) consumer choice.

Attributes

final type FocusedOnChoiceContra = [A, F[_], B1, B2] =>> FocusedOnChoiceContra[A, F, B1, B2]
Exported from CoreLib
final implicit def FocusedOnPairCo[F[_], B1, B2](f: FocusedCo[F, B1 |*| B2]): FocusedOnPairCo[F, B1, B2]
Exported from CoreLib
final type FocusedOnPairCo = [F[_], B1, B2] =>> FocusedOnPairCo[F, B1, B2]
Exported from CoreLib
final implicit def FocusedOnPairContra[A, F[_], B1, B2](f: FocusedContra[F, B1 |*| B2]): FocusedOnPairContra[A, F, B1, B2]
Exported from CoreLib
final type FocusedOnPairContra = [A, F[_], B1, B2] =>> FocusedOnPairContra[A, F, B1, B2]
Exported from CoreLib
final implicit def FocusedOnPlusCo[F[_], B1, B2](f: FocusedCo[F, B1 |+| B2]): FocusedOnPlusCo[F, B1, B2]
Exported from CoreLib
final type FocusedOnPlusCo = [F[_], B1, B2] =>> FocusedOnPlusCo[F, B1, B2]
Exported from CoreLib
final implicit def FocusedOnPlusContra[A, F[_], B1, B2](f: FocusedContra[F, B1 |+| B2]): FocusedOnPlusContra[A, F, B1, B2]
Exported from CoreLib

Extends the focus to the left/right side of the (currently focused) producer choice.

Extends the focus to the left/right side of the (currently focused) producer choice.

Attributes

final type FocusedOnPlusContra = [A, F[_], B1, B2] =>> FocusedOnPlusContra[A, F, B1, B2]
Exported from CoreLib
final type FunExprOps = FunExprOps
Exported from ClosedDSL
final val Functor: Functor.type
Exported from CoreLib
final type Functor = [F[_]] =>> Functor[F]
Exported from CoreLib
final implicit def FunctorOps[F[_], A](fa: $[F[A]]): FunctorOps[F, A]
Exported from CoreDSL
final type FunctorOps = [F[_], A] =>> FunctorOps[F, A]
Exported from CoreDSL
final val Getter: Getter.type
Exported from CoreLib
final type Getter = Getter
Exported from CoreLib
def IV[A, B, C, D](f: B |*| C -⚬ D): A |*| B |*| C -⚬ A |*| D
Exported from CoreLib
def IX[A, B, C]: A |*| B |*| C -⚬ A |*| C |*| B
Exported from CoreLib
def IXI[A, B, C, D]: A |*| B |*| C |*| D -⚬ A |*| C |*| B |*| D
Exported from CoreLib
final type Id = Id
Exported from CoreLib
def [A, B, C, D](f: B -⚬ C |*| D): A |*| B -⚬ A |*| C |*| D
Exported from CoreLib

Λ is the uppercase Greek letter lambda.

Λ is the uppercase Greek letter lambda.

Attributes

final val Junction: Junction.type
Exported from CoreLib
final val LList: LList.type
Exported from CoreLib
final type LList = LList
Exported from CoreLib
final val LList1: LList1.type
Exported from CoreLib
final type LList1 = LList1
Exported from CoreLib
final type LTerminus = LTerminus
Exported from CoreDSL
Exported from CoreDSL
final type LambdaOps = LambdaOps
Exported from CoreDSL
final val Lease: Lease.type
Exported from CoreLib
final type Lease = Lease
Exported from CoreLib
final val LeasePool: LeasePool.type
Exported from CoreLib
final type LeasePool = LeasePool
Exported from CoreLib
final val Lens: Lens.type
Exported from CoreLib
final type Lens = Lens
Exported from CoreLib
final implicit def LinearFunctionOps[A, B](self: A -⚬ B): LinearFunctionOps[A, B]
Exported from CoreLib
Exported from CoreLib
final val Lock: Lock.type
Exported from CoreLib
final type Lock = Lock
Exported from CoreLib
final val Maybe: Maybe.type
Exported from CoreLib
final type Maybe = Maybe
Exported from CoreLib
final type Monad = [F[_]] =>> Monad[F]
Exported from CoreLib
final val Monoid: Monoid.type
Exported from CoreLib
final type Monoid = Monoid
Exported from CoreLib
final val Multiple: Multiple.type
Exported from CoreLib
final type Multiple = Multiple
Exported from CoreLib
final val NAffine: NAffine.type
Exported from CoreLib
final type NAffine = NAffine
Exported from CoreLib
final type NComonoid = NComonoid
Exported from CoreLib
final val NMonoid: NMonoid.type
Exported from CoreLib
final type NMonoid = NMonoid
Exported from CoreLib
final type Need = Need
Exported from CoreDSL
final type Neg = Neg
Exported from Scaletto
Exported from ClosedDSL
Exported from CoreDSL
final type One = One
Exported from CoreDSL
final val Optionally: Optionally.type
Exported from CoreLib
final type Optionally = Optionally
Exported from CoreLib
final val PMaybe: PMaybe.type
Exported from CoreLib
final type PMaybe = PMaybe
Exported from CoreLib
final type PMonoid = PMonoid
Exported from CoreLib
final val PUnlimited: PUnlimited.type
Exported from CoreLib
final type PUnlimited = PUnlimited
Exported from CoreLib
final type Ping = Ping
Exported from CoreDSL
final type Pong = Pong
Exported from CoreDSL
final type RTerminus = RTerminus
Exported from CoreDSL
final type Rec = [F[_]] =>> Rec[F]
Exported from CoreDSL
final val RefCounted: RefCounted.type
Exported from ScalettoLib
final type RefCounted = RefCounted
Exported from ScalettoLib
final type Res = Res
Exported from Scaletto
Exported from Scaletto
final type ScalaFun = ScalaFun
Exported from Scaletto
final type ScalaFuns = ScalaFuns
Exported from Scaletto
final val Semigroup: Semigroup.type
Exported from CoreLib
final type Semigroup = Semigroup
Exported from CoreLib
final val Signaling: Signaling.type
Exported from CoreLib
Exported from CoreLib
final val Transportive: Transportive.type
Exported from CoreLib
final type Transportive = [F[_]] =>> Transportive[F]
Exported from CoreLib
override val UInt31: UInt31Scaletto
Exported from Scaletto
final type UInt31 = UInt31
Exported from CoreDSL
Exported from Scaletto
final type UInt31s = UInt31s
Exported from CoreDSL
final val Unlimited: Unlimited.type
Exported from CoreLib
final type Unlimited = Unlimited
Exported from CoreLib
def VI[A, B, C, D](f: A |*| B -⚬ D): A |*| B |*| C -⚬ D |*| C
Exported from CoreLib
final type Val = Val
Exported from Scaletto
final val Val: Val.type
Exported from ScalettoLib
final val ValSwitch: ValSwitch.type
Exported from Scaletto
final type ValSwitch = ValSwitch
Exported from Scaletto
Exported from Scaletto
final type ValSwitchInitCase = [A, A0 <: A] =>> ValSwitchInitCase[A, A0]
Exported from Scaletto
def XI[A, B, C]: A |*| B |*| C -⚬ B |*| A |*| C
Exported from CoreLib
final type Zero = Zero
Exported from CoreDSL
def absorbR[A, B, C]: A =⚬ B |*| C -⚬ A =⚬ B |*| C
Exported from ClosedLib

Make a function A =⚬ B ''"absorb"'' a C and return it as part of its output, i.e. A =⚬ (B |*| C).

Make a function A =⚬ B ''"absorb"'' a C and return it as part of its output, i.e. A =⚬ (B |*| C).

Attributes

def acquire[A, R, B](acquire: A => (R, B), release: Option[R => Unit]): Val[A] -⚬ Res[R] |*| Val[B]
Exported from Scaletto

Acquires a resource of type R.

Acquires a resource of type R.

Type parameters

A

parameters of the acquire function

B

additional data produced by acquiring the resource

R

type of the resource

Value parameters

release

called to release the resource in case of a crash. None means no cleanup is needed

Attributes

def acquire[A, R, B](acquire: ScalaFun[A, (R, B)], release: Option[ScalaFun[R, Unit]]): Val[A] -⚬ Res[R] |*| Val[B]
Exported from Scaletto
def acquire0[A, R](acquire: A => R, release: Option[R => Unit]): Val[A] -⚬ Res[R]
Exported from ScalettoLib

Variant of acquire that does not produce extra output in addition to the resource.

Variant of acquire that does not produce extra output in addition to the resource.

Attributes

def acquireAsync[A, R, B](acquire: A => Async[(R, B)], release: Option[R => Async[Unit]]): Val[A] -⚬ Res[R] |*| Val[B]
Exported from Scaletto
def acquireAsync0[A, R](acquire: A => Async[R], release: Option[R => Async[Unit]]): Val[A] -⚬ Res[R]
Exported from ScalettoLib

Variant of acquireAsync that does not produce extra output in addition to the resource.

Variant of acquireAsync that does not produce extra output in addition to the resource.

Attributes

def alsoPrintLine[A](f: A => String): Val[A] -⚬ Val[A]
Exported from ScalettoLib
def alsoPrintLine: Val[String] -⚬ Val[String]
Exported from ScalettoLib
def andThen[A, B, C](f: A -⚬ B, g: B -⚬ C): A -⚬ C
Exported from CoreDSL
def assocLR[A, B, C]: A |*| B |*| C -⚬ A |*| B |*| C
Exported from CoreDSL
def assocRL[A, B, C]: A |*| B |*| C -⚬ A |*| B |*| C
Exported from CoreDSL
def awaitChooseL[A, B](using A: Negative[A]): A |&| B -⚬ Need |*| A
Exported from CoreLib

Chooses the left alternative A of the choice A |&| B, but only after the Need signal from the first out-port arrives. Until then, the producer of A |&| B will see it as undecided. This is different from chooseL[A, B] > awaitNegFst[A], in which the producer of A |&| B knows immediately that the left side is chosen.

Chooses the left alternative A of the choice A |&| B, but only after the Need signal from the first out-port arrives. Until then, the producer of A |&| B will see it as undecided. This is different from chooseL[A, B] > awaitNegFst[A], in which the producer of A |&| B knows immediately that the left side is chosen.

Attributes

def awaitChooseR[A, B](using B: Negative[B]): A |&| B -⚬ Need |*| B
Exported from CoreLib

Analogous to awaitChooseL, but chooses the right side.

Analogous to awaitChooseL, but chooses the right side.

Attributes

def awaitInjectL[A, B](using A: Positive[A]): Done |*| A -⚬ A |+| B
Exported from CoreLib

Injects A from the the second in-port to the left side of the |+| in the out-port, but only after the Done signal from the first in-port arrives. That means that the consumer of A |+| B will see it as undecided until the Done signal arrives. This is different from awaitPosFst[A] > injectL[A, B], in which the consumer of A |+| B knows immediately that it is the left case.

Injects A from the the second in-port to the left side of the |+| in the out-port, but only after the Done signal from the first in-port arrives. That means that the consumer of A |+| B will see it as undecided until the Done signal arrives. This is different from awaitPosFst[A] > injectL[A, B], in which the consumer of A |+| B knows immediately that it is the left case.

This is a convenience method on top of injectLWhenDone that which absorbs the Done signal using the given Junction.Positive.

Attributes

def awaitInjectR[A, B](using B: Positive[B]): Done |*| B -⚬ A |+| B
Exported from CoreLib

Analogous to joinInjectL, but injects to the right.

Analogous to joinInjectL, but injects to the right.

Attributes

def awaitNegFst[A](using A: Negative[A]): A -⚬ Need |*| A
Exported from CoreLib
def awaitNegSnd[A](using A: Negative[A]): A -⚬ A |*| Need
Exported from CoreLib
def awaitPingFst[A](using A: Positive[A]): Ping |*| A -⚬ A
Exported from CoreLib
def awaitPingSnd[A](using A: Positive[A]): A |*| Ping -⚬ A
Exported from CoreLib
def awaitPongFst[A](using A: Negative[A]): A -⚬ Pong |*| A
Exported from CoreLib
def awaitPongSnd[A](using A: Negative[A]): A -⚬ A |*| Pong
Exported from CoreLib
def awaitPosChooseL[A, B](using A: Positive[A]): Done |*| A |&| B -⚬ A
Exported from CoreLib

Analogous to awaitChooseL, but awaits a positive (i.e. Done) signal.

Analogous to awaitChooseL, but awaits a positive (i.e. Done) signal.

Attributes

def awaitPosChooseR[A, B](using B: Positive[B]): Done |*| A |&| B -⚬ B
Exported from CoreLib

Analogous to awaitChooseR, but awaits a positive (i.e. Done) signal.

Analogous to awaitChooseR, but awaits a positive (i.e. Done) signal.

Attributes

def awaitPosFst[A](using A: Positive[A]): Done |*| A -⚬ A
Exported from CoreLib
def awaitPosSnd[A](using A: Positive[A]): A |*| Done -⚬ A
Exported from CoreLib
def backvert[A]: A |*| -[A] -⚬ One
Exported from InvertDSL
 ┏━━━━━━━━━━━┓
 ┞────┐      ┃
 ╎  A │┄┄┐   ┃
 ┟────┘  ┆   ┃
 ┃       ┆   ┃
 ┞────┐  ┆   ┃
 ╎-[A]│←┄┘   ┃
 ┟────┘      ┃
 ┗━━━━━━━━━━━┛

Attributes

Exported from CoreLib

Obstructs interaction on the in-port (i.e. from the left) until Pong is received.

Obstructs interaction on the in-port (i.e. from the left) until Pong is received.

Attributes

Exported from CoreLib

Obstructs interaction on the out-port (i.e. from the right) until Ping is received.

Obstructs interaction on the out-port (i.e. from the right) until Ping is received.

Attributes

def blocking[A, B](f: A => B): Val[A] -⚬ Val[B]
Exported from Scaletto

Executes a potentially blocking operation. The runtime will ensure that the blocking operation does not impede any of the concurrently happening non-blocking computations.

Executes a potentially blocking operation. The runtime will ensure that the blocking operation does not impede any of the concurrently happening non-blocking computations.

Attributes

val category: Category[-⚬]
Exported from CoreLib
def choice[A, B, C](caseLeft: A -⚬ B, caseRight: A -⚬ C): A -⚬ B |&| C
Exported from CoreDSL
def chooseL[A, B]: A |&| B -⚬ A
Exported from CoreDSL
def chooseLOnPing[A, B]: Ping |*| A |&| B -⚬ A
Exported from CoreLib
def chooseLOnPong[A, B]: A |&| B -⚬ Pong |*| A
Exported from CoreDSL
def chooseLWhenDone[A, B]: Done |*| A |&| B -⚬ Done |*| A
Exported from CoreLib
def chooseLWhenNeed[A, B]: Need |*| A |&| B -⚬ Need |*| A
Exported from CoreLib
def chooseR[A, B]: A |&| B -⚬ B
Exported from CoreDSL
def chooseROnPing[A, B]: Ping |*| A |&| B -⚬ B
Exported from CoreLib
def chooseROnPong[A, B]: A |&| B -⚬ Pong |*| B
Exported from CoreDSL
def chooseRWhenDone[A, B]: Done |*| A |&| B -⚬ Done |*| B
Exported from CoreLib
def chooseRWhenNeed[A, B]: A |&| Need |*| B -⚬ Need |*| B
Exported from CoreLib
Exported from ScalettoLib
def coDistributeL[A, B, C]: A |*| B |&| A |*| C -⚬ A |*| B |&| C
Exported from CoreDSL

Inverse of coFactorL.

Inverse of coFactorL.

Attributes

def coDistributeR[A, B, C]: A |*| C |&| B |*| C -⚬ A |&| B |*| C
Exported from CoreDSL

Inverse of coFactorR.

Inverse of coFactorR.

Attributes

def coFactorL[A, B, C]: A |*| B |&| C -⚬ A |*| B |&| A |*| C
Exported from CoreDSL
def coFactorR[A, B, C]: A |&| B |*| C -⚬ A |*| C |&| B |*| C
Exported from CoreDSL
def combine[A : Semigroup]: A |*| A -⚬ A
Exported from CoreLib
def const[A](a: A): One -⚬ Val[A]
Exported from ScalettoLib
def constList[A](as: List[A]): One -⚬ LList[Val[A]]
Exported from ScalettoLib
def constList1[A](as: ::[A]): Done -⚬ LList1[Val[A]]
Exported from ScalettoLib
def constList1[A](a: A, as: List[A]): Done -⚬ LList1[Val[A]]
Exported from ScalettoLib
def constList1Of[A](a: A, as: A*): Done -⚬ LList1[Val[A]]
Exported from ScalettoLib
def constListOf[A](as: A*): One -⚬ LList[Val[A]]
Exported from ScalettoLib
def constListOf1[A](a: A, as: A*): Done -⚬ LList[Val[A]]
Exported from ScalettoLib
def constNeg[A](a: A): Neg[A] -⚬ Need
Exported from Scaletto
def constVal[A](a: A): Done -⚬ Val[A]
Exported from Scaletto
def contramapNeg[A, B](f: A => B): Neg[B] -⚬ Neg[A]
Exported from Scaletto

Lifts an ordinary Scala function to a linear function on demands, in opposite direction.

Lifts an ordinary Scala function to a linear function on demands, in opposite direction.

Attributes

def contrapositive[A, B](f: A -⚬ B): -[B] -⚬ -[A]
Exported from InvertDSL
def crashNow[A, B](msg: String): A -⚬ B
Exported from CrashDSL
def crashWhenDone[A, B](msg: String): Done |*| A -⚬ B
Exported from CrashDSL

Starts propagating an error downstream (which might be through both the in-port and the out-port).

Starts propagating an error downstream (which might be through both the in-port and the out-port).

Use only for irrecoverable errors. Recoverable errors should be expressed in function signature and handled appropriately.

Done on the in-port is the trigger to crash. A on the in-port allows to consume any unhandled resources. B on the out-port allows to fulfill any obligation to produce resources.

Attributes

def crashWhenNeed[A, B](msg: String): A -⚬ Need |*| B
Exported from CrashDSL
override def curry[A, B, C](f: A |*| B -⚬ C): A -⚬ B =⚬ C
Exported from InvertDSL
def decrement: Val[Int] -⚬ Done |+| Val[Int]
Exported from ScalettoLib
def defer[A](using A: Positive[A]): A -⚬ Deferred[A]
Exported from CoreLib
def delay: Val[FiniteDuration] -⚬ Done
Exported from Scaletto
def delayChoiceAndSidesUntilDone[A, B](using A: Positive[A], B: Positive[B]): Done |*| A |&| B -⚬ A |&| B
Exported from CoreLib
def delayChoiceAndSidesUntilNeed[A, B](using A: Negative[A], B: Negative[B]): A |&| B -⚬ Need |*| A |&| B
Exported from CoreLib
Exported from CoreLib
Exported from CoreLib
def delayChoiceUntilPing[A, B]: Ping |*| A |&| B -⚬ A |&| B
Exported from CoreLib
def delayChoiceUntilPong[A, B]: A |&| B -⚬ Pong |*| A |&| B
Exported from CoreLib
def delayEitherAndSidesUntilDone[A, B](using A: Positive[A], B: Positive[B]): Done |*| A |+| B -⚬ A |+| B
Exported from CoreLib
def delayEitherAndSidesUntilNeed[A, B](using A: Negative[A], B: Negative[B]): A |+| B -⚬ Need |*| A |+| B
Exported from CoreLib
Exported from CoreLib
Exported from CoreLib
def delayEitherUntilPing[A, B]: Ping |*| A |+| B -⚬ A |+| B
Exported from CoreLib
def delayEitherUntilPong[A, B]: A |+| B -⚬ Pong |*| A |+| B
Exported from CoreLib
def delayNeed: Need -⚬ Neg[FiniteDuration]
Exported from Scaletto
def delayVal[A](by: FiniteDuration): Val[A] -⚬ Val[A]
Exported from ScalettoLib
def delayVal[A](by: Done -⚬ Done): Val[A] -⚬ Val[A]
Exported from ScalettoLib
def delayValRandomMs[A](minMs: Int, maxMs: Int): Val[A] -⚬ Val[A]
Exported from ScalettoLib
def demand[A]: One -⚬ -[A] |*| A
Exported from InvertDSL

Creates a demand on the first out-port, channeling the provided resource to the second out-port. Alias for forevert.

Creates a demand on the first out-port, channeling the provided resource to the second out-port. Alias for forevert.

Attributes

def demandChoice[A, B]: -[A] |+| -[B] -⚬ -[A |&| B]
Exported from InvertDSL

Converts an obligation to handle either demand to an obligation to supply a choice. Alias for factorInversionOutOf_|+|.

Converts an obligation to handle either demand to an obligation to supply a choice. Alias for factorInversionOutOf_|+|.

Attributes

def demandChosen[A, B]: -[A |&| B] -⚬ -[A] |+| -[B]
Exported from InvertDSL

Converts a demand for choice to a demand of the chosen side. Alias for distributeInversionInto_|&amp;|.

Converts a demand for choice to a demand of the chosen side. Alias for distributeInversionInto_|&amp;|.

Attributes

def demandEither[A, B]: -[A] |&| -[B] -⚬ -[A |+| B]
Exported from InvertDSL

Converts choice of demands to demand of either. Alias for factorInversionOutOf_|&amp;|.

Converts choice of demands to demand of either. Alias for factorInversionOutOf_|&amp;|.

Attributes

def demandSeparately[A, B]: -[A |*| B] -⚬ -[A] |*| -[B]
Exported from InvertDSL

Attributes

def demandTogether[A, B]: -[A] |*| -[B] -⚬ -[A |*| B]
Exported from InvertDSL

Alias for factorOutInversion.

Alias for factorOutInversion.

Attributes

def detain[A](using A: Positive[A]): A -⚬ Detained[A]
Exported from CoreLib
def die[A]: -[-[A]] -⚬ A
Exported from InvertDSL

Double-inversion elimination.

Double-inversion elimination.

Attributes

def dii[A]: A -⚬ -[-[A]]
Exported from InvertDSL

Double-inversion introduction.

Double-inversion introduction.

Attributes

def discardFst[A, B](using A: Comonoid[A]): A |*| B -⚬ B
Exported from CoreLib
def discardSnd[A, B](using B: Comonoid[B]): A |*| B -⚬ A
Exported from CoreLib
Exported from CoreDSL
Exported from CoreDSL
def distributeInversion[A, B]: -[A |*| B] -⚬ -[A] |*| -[B]
Exported from InvertDSL
 ┏━━━━━━━━━━━┓
 ┃           ┞────┐
 ┞────┐      ╎-[A]│
 ╎ ⎡A⎤│      ┟────┘
 ╎-⎢⊗⎥│      ┃
 ╎ ⎣B⎦│      ┞────┐
 ┟────┘      ╎-[B]│
 ┃           ┟────┘
 ┗━━━━━━━━━━━┛

Attributes

def distributeInversionInto_|&|[A, B]: -[A |&| B] -⚬ -[A] |+| -[B]
Exported from InvertDSL
def distributeInversionInto_|+|[A, B]: -[A |+| B] -⚬ -[A] |&| -[B]
Exported from InvertDSL
def distributeL[A, B, C]: A |*| B |+| C -⚬ A |*| B |+| A |*| C
Exported from CoreDSL

Distribute the factor on the left into the summands on the right. Inverse of factorL.

Distribute the factor on the left into the summands on the right. Inverse of factorL.

Attributes

def distributeR[A, B, C]: A |+| B |*| C -⚬ A |*| C |+| B |*| C
Exported from CoreDSL

Distribute the factor on the right into the summands on the left. Inverse of factorR.

Distribute the factor on the right into the summands on the left. Inverse of factorR.

Attributes

def done: One -⚬ Done
Exported from CoreDSL
Exported from InvertDSL
Exported from InvertDSL

Alias for die.

Alias for die.

Attributes

Exported from InvertDSL

Alias for dii.

Alias for dii.

Attributes

def dualRec[F[_], G[_]](ev: Dual1[F, G]): Dual[Rec[F], Rec[G]]
Exported from CoreLib

If F[A] is dual to G[B] for all dual pairs A, B, then Rec[F] is dual to Rec[G].

If F[A] is dual to G[B] for all dual pairs A, B, then Rec[F] is dual to Rec[G].

Attributes

def dualSymmetric[A, B](ev: Dual[A, B]): Dual[B, A]
Exported from CoreLib
def dup[A]: Val[A] -⚬ Val[A] |*| Val[A]
Exported from Scaletto
def dupNeg[A]: Neg[A] |*| Neg[A] -⚬ Neg[A]
Exported from Scaletto
def effect[R, A, B](f: (R, A) => B): Res[R] |*| Val[A] -⚬ Res[R] |*| Val[B]
Exported from Scaletto

Performs a (potentially) effectful operation on a resource, producing some output.

Performs a (potentially) effectful operation on a resource, producing some output.

Type parameters

A

additional parameter of the operation

B

additional output of the operation

R

type of the resource

Value parameters

f

the effectful operation

Attributes

def effect[R, A, B](f: ScalaFun[(R, A), B]): Res[R] |*| Val[A] -⚬ Res[R] |*| Val[B]
Exported from Scaletto
def effect0[R](f: R => Unit): Res[R] -⚬ Res[R]
Exported from ScalettoLib

Variant of effect that does not take additional input and does not produce additional output.

Variant of effect that does not take additional input and does not produce additional output.

Attributes

def effectAsync[R, A, B](f: (R, A) => Async[B]): Res[R] |*| Val[A] -⚬ Res[R] |*| Val[B]
Exported from Scaletto
def effectAsync0[R](f: R => Async[Unit]): Res[R] -⚬ Res[R]
Exported from ScalettoLib

Variant of effectAsync that does not take additional input and does not produce additional output.

Variant of effectAsync that does not take additional input and does not produce additional output.

Attributes

def effectRd[R, B](f: R => B): Res[R] -⚬ Res[R] |*| Val[B]
Exported from ScalettoLib
def effectRd[R, B](f: ScalaFun[R, B]): Res[R] -⚬ Res[R] |*| Val[B]
Exported from ScalettoLib
def effectWr[R, A](f: (R, A) => Unit): Res[R] |*| Val[A] -⚬ Res[R]
Exported from Scaletto

Variant of effect that does not produce output in addition to performing the effect. Can be viewed as ''wr''iting an A into the resource.

Variant of effect that does not produce output in addition to performing the effect. Can be viewed as ''wr''iting an A into the resource.

Attributes

def effectWr[R, A](f: ScalaFun[(R, A), Unit]): Res[R] |*| Val[A] -⚬ Res[R]
Exported from Scaletto
def effectWrAsync[R, A](f: (R, A) => Async[Unit]): Res[R] |*| Val[A] -⚬ Res[R]
Exported from Scaletto
def either[A, B, C](caseLeft: A -⚬ C, caseRight: B -⚬ C): A |+| B -⚬ C
Exported from CoreDSL
def elimFst[A, B](f: A -⚬ One): A |*| B -⚬ B
Exported from CoreDSL
def elimFst[B]: One |*| B -⚬ B
Exported from CoreDSL
def elimSnd[A, B](f: B -⚬ One): A |*| B -⚬ A
Exported from CoreDSL
def elimSnd[A]: A |*| One -⚬ A
Exported from CoreDSL
override def eval[A, B]: A =⚬ B |*| A -⚬ B
Exported from InvertDSL
def factorInversionOutOf_|&|[A, B]: -[A] |&| -[B] -⚬ -[A |+| B]
Exported from InvertDSL
def factorInversionOutOf_|+|[A, B]: -[A] |+| -[B] -⚬ -[A |&| B]
Exported from InvertDSL
def factorL[A, B, C]: A |*| B |+| A |*| C -⚬ A |*| B |+| C
Exported from CoreDSL

Factor out the factor A on the left of both summands.

Factor out the factor A on the left of both summands.

Attributes

def factorOutInversion[A, B]: -[A] |*| -[B] -⚬ -[A |*| B]
Exported from InvertDSL
 ┏━━━━━━━━━━━┓
 ┞────┐      ┃
 ╎-[A]│      ┞────┐
 ┟────┘      ╎ ⎡A⎤│
 ┃           ╎-⎢⊗⎥│
 ┞────┐      ╎ ⎣B⎦│
 ╎-[B]│      ┟────┘
 ┟────┘      ┃
 ┗━━━━━━━━━━━┛

Attributes

def factorR[A, B, C]: A |*| C |+| B |*| C -⚬ A |+| B |*| C
Exported from CoreDSL

Factor out the factor C on the right of both summands.

Factor out the factor C on the right of both summands.

Attributes

def forevert[A]: One -⚬ -[A] |*| A
Exported from InvertDSL
 ┏━━━━━━┓
 ┃      ┞────┐
 ┃   ┌┄┄╎-[A]│
 ┃   ┆  ┟────┘
 ┃   ┆  ┃
 ┃   ┆  ┞────┐
 ┃   └┄→╎  A │
 ┃      ┟────┘
 ┗━━━━━━┛

Attributes

Exported from CoreDSL
def forkMap[A, B](f: Done -⚬ A, g: Done -⚬ B): Done -⚬ A |*| B
Exported from CoreDSL
def forkMapNeed[A, B](f: A -⚬ Need, g: B -⚬ Need): A |*| B -⚬ Need
Exported from CoreDSL
Exported from CoreDSL
Exported from CoreDSL
Exported from CoreDSL
def fst[A, B, C](f: A -⚬ B): A |*| C -⚬ B |*| C
Exported from CoreDSL
def fulfill[A]: Val[A] |*| Neg[A] -⚬ One
Exported from Scaletto

Uses the value (eventually) produced by Val to satisfy the demand of Neg.

Uses the value (eventually) produced by Val to satisfy the demand of Neg.

Attributes

def getFst[A, B](using A: Cosemigroup[A]): A |*| B -⚬ A |*| A |*| B
Exported from CoreLib
def getSnd[A, B](using B: Cosemigroup[B]): A |*| B -⚬ B |*| A |*| B
Exported from CoreLib
export given_Comparable_Val_Val[A : Ordering]
Exported from ScalettoLib
export given_NMonoid_Neg[A]
Exported from ScalettoLib
def id[A]: A -⚬ A
Exported from CoreDSL
def inflate[A]: Need -⚬ Neg[A]
Exported from Scaletto
def injectL[A, B]: A -⚬ A |+| B
Exported from CoreDSL
def injectLOnPing[A, B]: Ping |*| A -⚬ A |+| B
Exported from CoreDSL
def injectLOnPong[A, B]: A -⚬ Pong |*| A |+| B
Exported from CoreLib
def injectLWhenDone[A, B]: Done |*| A -⚬ Done |*| A |+| B
Exported from CoreLib
def injectLWhenNeed[A, B]: Need |*| A -⚬ Need |*| A |+| B
Exported from CoreLib
def injectR[A, B]: B -⚬ A |+| B
Exported from CoreDSL
def injectROnPing[A, B]: Ping |*| B -⚬ A |+| B
Exported from CoreDSL
def injectROnPong[A, B]: B -⚬ Pong |*| A |+| B
Exported from CoreLib
def injectRWhenDone[A, B]: Done |*| B -⚬ A |+| Done |*| B
Exported from CoreLib
def injectRWhenNeed[A, B]: Need |*| B -⚬ Need |*| A |+| B
Exported from CoreLib
Exported from ClosedLib

Function object (internal hom) is contravariant in the input type.

Function object (internal hom) is contravariant in the input type.

Attributes

def introFst[A, X](f: One -⚬ X): A -⚬ X |*| A
Exported from CoreDSL
def introFst[B]: B -⚬ One |*| B
Exported from CoreDSL
def introSnd[A, X](f: One -⚬ X): A -⚬ A |*| X
Exported from CoreDSL
def introSnd[A]: A -⚬ A |*| One
Exported from CoreDSL
def inversionDuality[A]: Dual[A, -[A]]
Exported from InvertLib
def invertClosure[A, B]: -[A =⚬ B] -⚬ B =⚬ A
Exported from InvertDSL
Exported from InvertDSL
Exported from InvertDSL
Exported from InvertDSL
Exported from InvertDSL
Exported from InvertDSL
def isEq[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
def isGt[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
def isGteq[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
def isLt[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
def isLteq[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
Exported from CoreDSL
def joinMap[A, B](f: A -⚬ Done, g: B -⚬ Done): A |*| B -⚬ Done
Exported from CoreDSL
def joinMapNeed[A, B](f: Need -⚬ A, g: Need -⚬ B): Need -⚬ A |*| B
Exported from CoreDSL
Exported from CoreDSL
Exported from CoreDSL
Exported from CoreDSL
export junctionNeg[A]
Exported from ScalettoLib
export junctionVal[A]
Exported from ScalettoLib
def lInvert[A, B](using ev: Dual[A, B]): One -⚬ B |*| A
Exported from CoreLib
def lInvertChoice[A, B, Ȧ, ](lInvertA: One -⚬ Ȧ |*| A, lInvertB: One -⚬ |*| B): One -⚬ Ȧ |&| |*| A |+| B
Exported from CoreLib
def lInvertPair[A, B, Ȧ, ](lInvertA: One -⚬ Ȧ |*| A, lInvertB: One -⚬ |*| B): One -⚬ Ȧ |*| |*| A |*| B
Exported from CoreLib
Exported from CoreDSL
def lInvertRec[F[_], G[_]](lInvertSub: [x, y] => (x$1: One -⚬ x |*| y) => One -⚬ F[x] |*| G[y]): One -⚬ Rec[F] |*| Rec[G]
Exported from CoreLib
Exported from CoreDSL

Reverses the Need signal (flowing in the negative direciton, i.e. against the -⚬ arrow) into a Done signal (flowing in the positive direction, i.e. along the -⚬ arrow).

Reverses the Need signal (flowing in the negative direciton, i.e. against the -⚬ arrow) into a Done signal (flowing in the positive direction, i.e. along the -⚬ arrow).

 ┏━━━━━━┓
 ┃      ┞────┐
 ┃   ┌┄┄╎Need│
 ┃   ┆  ┟────┘
 ┃   ┆  ┃
 ┃   ┆  ┞────┐
 ┃   └┄→╎Done│
 ┃      ┟────┘
 ┗━━━━━━┛

Attributes

Exported from ScalettoLib
def liftBipredicate[A, B](p: (A, B) => Boolean): Val[A] |*| Val[B] -⚬ Bool
Exported from ScalettoLib
def liftBoolean: Val[Boolean] -⚬ Bool
Exported from ScalettoLib
def liftEither[A, B]: Val[Either[A, B]] -⚬ Val[A] |+| Val[B]
Exported from Scaletto
def liftNegPair[A, B]: Neg[(A, B)] -⚬ Neg[A] |*| Neg[B]
Exported from Scaletto
def liftPair[A, B]: Val[(A, B)] -⚬ Val[A] |*| Val[B]
Exported from Scaletto
def liftScalaList1[A]: Val[::[A]] -⚬ LList1[Val[A]]
Exported from ScalettoLib
def listEndlessDuality[A, Ā](ev: Dual[A, Ā]): Dual[LList[A], Endless[Ā]]
Exported from CoreLib
def mVal[A, R](init: A => R): Val[A] -⚬ Res[R]
Exported from ScalettoLib

Create a resource that is just a (potentially) mutable value which does not need any cleanup.

Create a resource that is just a (potentially) mutable value which does not need any cleanup.

Value parameters

init

function that initializes the (potentially) mutable value from an immutable one.

Attributes

def mapVal[A, B](f: A => B): Val[A] -⚬ Val[B]
Exported from Scaletto

Lifts an ordinary Scala function to a linear function on Vals.

Lifts an ordinary Scala function to a linear function on Vals.

Attributes

def mapVal[A, B](f: ScalaFun[A, B]): Val[A] -⚬ Val[B]
Exported from Scaletto
def matchingChoiceLR[A, B, C, D]: A |+| B |*| C |&| D -⚬ A |*| C |+| B |*| D
Exported from CoreLib

From the choice ''available'' on the right (C |&| D), choose the one corresponding to the choice ''made'' on the left (A |+| B): if on the left there is A, choose C, if on the left thre is B, choose D.

From the choice ''available'' on the right (C |&| D), choose the one corresponding to the choice ''made'' on the left (A |+| B): if on the left there is A, choose C, if on the left thre is B, choose D.

Attributes

def matchingChoiceRL[A, B, C, D]: A |&| B |*| C |+| D -⚬ A |*| C |+| B |*| D
Exported from CoreLib

From the choice ''available'' on the left (A |&| B), choose the one corresponding to the choice ''made'' on the right (C |+| D): if on the right there is C, choose A, if on the right there is D, choose B.

From the choice ''available'' on the left (A |&| B), choose the one corresponding to the choice ''made'' on the right (C |+| D): if on the right there is C, choose A, if on the right there is D, choose B.

Attributes

def maybeToOption[A]: Maybe[Val[A]] -⚬ Val[Option[A]]
Exported from ScalettoLib
def mergeDemands[A]: Neg[A] |*| Neg[A] -⚬ Neg[A]
Exported from ScalettoLib
def need: Need -⚬ One
Exported from CoreDSL
Exported from InvertDSL
export negValDuality[A]
Exported from ScalettoLib
def neglect[A]: Val[A] -⚬ Done
Exported from Scaletto
def notifyChoice[A, B]: Pong |*| A |&| B -⚬ A |&| B
Exported from CoreDSL

Signals (in the negative direction) when it is known which side of the choice (A |&| B) has been chosen.

Signals (in the negative direction) when it is known which side of the choice (A |&| B) has been chosen.

Attributes

def notifyChoiceAndLeft[A, B](using A: Negative[A]): Pong |*| A |&| B -⚬ A |&| B
Exported from CoreLib

Notifies when the choice (|&amp;|) is made and if it is left, the left side notifies.

Notifies when the choice (|&amp;|) is made and if it is left, the left side notifies.

Attributes

def notifyChoiceAndLeft[A, B](notifyL: Pong |*| A -⚬ A): Pong |*| A |&| B -⚬ A |&| B
Exported from CoreLib

Notifies when the choice (|&amp;|) is made and if it is left, the left side notifies using the given function.

Notifies when the choice (|&amp;|) is made and if it is left, the left side notifies using the given function.

Attributes

def notifyChoiceAndRight[A, B](using B: Negative[B]): Pong |*| A |&| B -⚬ A |&| B
Exported from CoreLib

Notifies when the choice (|&amp;|) is made and if it is right, the right side notifies.

Notifies when the choice (|&amp;|) is made and if it is right, the right side notifies.

Attributes

def notifyChoiceAndRight[A, B](notifyR: Pong |*| B -⚬ B): Pong |*| A |&| B -⚬ A |&| B
Exported from CoreLib

Notifies when the choice (|&amp;|) is made and if it is right, the right side notifies using the given function.

Notifies when the choice (|&amp;|) is made and if it is right, the right side notifies using the given function.

Attributes

def notifyChoiceAndSides[A, B](using A: Negative[A], B: Negative[B]): Pong |*| A |&| B -⚬ A |&| B
Exported from CoreLib

Notifies when the choice (|&amp;|) is made and the chosen side notifies.

Notifies when the choice (|&amp;|) is made and the chosen side notifies.

Attributes

def notifyChoiceAndSides[A, B](notifyL: Pong |*| A -⚬ A, notifyR: Pong |*| B -⚬ B): Pong |*| A |&| B -⚬ A |&| B
Exported from CoreLib

Notifies when the choice (|&amp;|) is made and the chosen side notifies using the respective given function.

Notifies when the choice (|&amp;|) is made and the chosen side notifies using the respective given function.

Attributes

Exported from CoreDSL
Exported from CoreDSL
def notifyEither[A, B]: A |+| B -⚬ Ping |*| A |+| B
Exported from CoreDSL

Signals when it is decided whether A |+| B actually contains the left side or the right side.

Signals when it is decided whether A |+| B actually contains the left side or the right side.

Attributes

def notifyEitherAndLeft[A, B](using A: Positive[A]): A |+| B -⚬ Ping |*| A |+| B
Exported from CoreLib

Notifies when the |+| is decided and if it is left, the left side notifies.

Notifies when the |+| is decided and if it is left, the left side notifies.

Attributes

def notifyEitherAndLeft[A, B](notifyL: A -⚬ Ping |*| A): A |+| B -⚬ Ping |*| A |+| B
Exported from CoreLib

Notifies when the |+| is decided and if it is left, the left side notifies using the given function.

Notifies when the |+| is decided and if it is left, the left side notifies using the given function.

Attributes

def notifyEitherAndRight[A, B](using B: Positive[B]): A |+| B -⚬ Ping |*| A |+| B
Exported from CoreLib

Notifies when the |+| is decided and if it is right, the right side notifies.

Notifies when the |+| is decided and if it is right, the right side notifies.

Attributes

def notifyEitherAndRight[A, B](notifyR: B -⚬ Ping |*| B): A |+| B -⚬ Ping |*| A |+| B
Exported from CoreLib

Notifies when the |+| is decided and if it is right, the right side notifies using the given function.

Notifies when the |+| is decided and if it is right, the right side notifies using the given function.

Attributes

def notifyEitherAndSides[A, B](using A: Positive[A], B: Positive[B]): A |+| B -⚬ Ping |*| A |+| B
Exported from CoreLib

Notifies when the |+| is decided and the present side notifies.

Notifies when the |+| is decided and the present side notifies.

Attributes

def notifyEitherAndSides[A, B](notifyL: A -⚬ Ping |*| A, notifyR: B -⚬ Ping |*| B): A |+| B -⚬ Ping |*| A |+| B
Exported from CoreLib

Notifies when the |+| is decided and the present side notifies using the respective given function.

Notifies when the |+| is decided and the present side notifies using the respective given function.

Attributes

Exported from CoreDSL
Exported from CoreDSL
def notifyNeg[A]: Pong |*| Neg[A] -⚬ Neg[A]
Exported from Scaletto
def notifyNegFst[A](using A: Negative[A]): Pong |*| A -⚬ A
Exported from CoreLib
def notifyNegSnd[A](using A: Negative[A]): A |*| Pong -⚬ A
Exported from CoreLib
def notifyPosFst[A](using A: Positive[A]): A -⚬ Ping |*| A
Exported from CoreLib
def notifyPosSnd[A](using A: Positive[A]): A -⚬ A |*| Ping
Exported from CoreLib
def notifyVal[A]: Val[A] -⚬ Ping |*| Val[A]
Exported from Scaletto
def obj[A, B](f: A -⚬ B): One -⚬ A =⚬ B
Exported from ClosedDSL

Turn a function into a function object.

Turn a function into a function object.

Attributes

def optionToPMaybe[A]: Val[Option[A]] -⚬ PMaybe[Val[A]]
Exported from ScalettoLib
override def out[A, B, C](f: B -⚬ C): A =⚬ B -⚬ A =⚬ C
Exported from InvertDSL

Map the output of a function object.

Map the output of a function object.

Attributes

def output[A]: Functor[[x] =>> A =⚬ x]
Exported from ClosedLib

Function object (internal hom) is covariant in the output type.

Function object (internal hom) is covariant in the output type.

Attributes

def pMaybeToOption[A]: PMaybe[Val[A]] -⚬ Val[Option[A]]
Exported from ScalettoLib
def pack[F[_]]: F[Rec[F]] -⚬ Rec[F]
Exported from CoreDSL

Hides one level of a recursive type definition.

Hides one level of a recursive type definition.

Attributes

def packDemand[F[_]]: -[F[Rec[F]]] -⚬ -[Rec[F]]
Exported from InvertDSL
def par[A, B, C, D](f: A -⚬ B, g: C -⚬ D): A |*| C -⚬ B |*| D
Exported from CoreDSL
def parFromOne[A, B](f: One -⚬ A, g: One -⚬ B): One -⚬ A |*| B
Exported from CoreLib
def parToOne[A, B](f: A -⚬ One, g: B -⚬ One): A |*| B -⚬ One
Exported from CoreLib
def ping: One -⚬ Ping
Exported from CoreDSL
Exported from InvertDSL
def pong: Pong -⚬ One
Exported from CoreDSL
Exported from InvertDSL
def printLine[A](f: A => String): Val[A] -⚬ Done
Exported from ScalettoLib
def printLine: Val[String] -⚬ Done
Exported from ScalettoLib
final val producing: producing.type
Exported from InvertDSL
def promise[A]: One -⚬ Neg[A] |*| Val[A]
Exported from Scaletto

Creates an entangled pair of demand (Neg) and supply (Val) such that when the demand is fulfilled with a value, that value will be produced by the supply.

Creates an entangled pair of demand (Neg) and supply (Val) such that when the demand is fulfilled with a value, that value will be produced by the supply.

Attributes

def putStr: Val[String] -⚬ Done
Exported from ScalettoLib
def rInvert[A, B](using ev: Dual[A, B]): A |*| B -⚬ One
Exported from CoreLib
def rInvertEither[A, B, Ȧ, ](rInvertA: A |*| Ȧ -⚬ One, rInvertB: B |*| -⚬ One): A |+| B |*| Ȧ |&| -⚬ One
Exported from CoreLib
def rInvertPair[A, B, Ȧ, ](rInvertA: A |*| Ȧ -⚬ One, rInvertB: B |*| -⚬ One): A |*| B |*| Ȧ |*| -⚬ One
Exported from CoreLib
Exported from CoreDSL
def rInvertRec[F[_], G[_]](rInvertSub: [x, y] => (x$1: x |*| y -⚬ One) => F[x] |*| G[y] -⚬ One): Rec[F] |*| Rec[G] -⚬ One
Exported from CoreLib
Exported from CoreDSL

Reverses the Done signal (flowing in the positive direction, i.e. along the -⚬ arrow) into a Need signal (flowing in the negative direciton, i.e. against the -⚬ arrow).

Reverses the Done signal (flowing in the positive direction, i.e. along the -⚬ arrow) into a Need signal (flowing in the negative direciton, i.e. against the -⚬ arrow).

 ┏━━━━━━━━━━━┓
 ┞────┐      ┃
 ╎Done│┄┄┐   ┃
 ┟────┘  ┆   ┃
 ┃       ┆   ┃
 ┞────┐  ┆   ┃
 ╎Need│←┄┘   ┃
 ┟────┘      ┃
 ┗━━━━━━━━━━━┛

Attributes

def race[A, B](using A: Positive[A], B: Positive[B]): A |*| B -⚬ A |*| B |+| A |*| B
Exported from CoreLib
def raceAgainstL[A](using A: Positive[A]): Done |*| A -⚬ A |+| A
Exported from CoreLib
def raceAgainstR[A](using A: Positive[A]): A |*| Done -⚬ A |+| A
Exported from CoreLib
def raceBy[A](notify: A -⚬ Ping |*| A): A |*| A -⚬ A |*| A |+| A |*| A
Exported from CoreLib
def raceBy[A, B](notifyA: A -⚬ Ping |*| A, notifyB: B -⚬ Ping |*| B): A |*| B -⚬ A |*| B |+| A |*| B
Exported from CoreLib
Exported from CoreLib

Races the two Done signals and

Races the two Done signals and

  • produces left if the first signal wins, in which case it returns the second signal that still has to be awaited;
  • produces right if the second signal wins, in which case it returns the first signal that still has to be awaited. It is biased to the left: if both signals have arrived by the time of inquiry, returns left.

Attributes

Exported from CoreDSL

Races the two Ping signals. Produces left if the first signal wins and right if the second signal wins. It is biased to the left: if both signals have arrived by the time of inquiry, returns left.

Races the two Ping signals. Produces left if the first signal wins and right if the second signal wins. It is biased to the left: if both signals have arrived by the time of inquiry, returns left.

Attributes

def racePreferred[A, B](using A: Positive[A], B: Positive[B]): Ping |*| A |*| B -⚬ A |*| B |+| A |*| B
Exported from CoreLib
def readLine: Done -⚬ Val[String]
Exported from ScalettoLib
def rec[A, B](f: A -⚬ B => A -⚬ B): A -⚬ B
Exported from CoreDSL
def rec2[A, B, C, D](fs: (A -⚬ B, C -⚬ D) => (A -⚬ B, C -⚬ D)): (A -⚬ B, C -⚬ D)
Exported from CoreLib
def rec2[A, B, C, D](f: (A -⚬ B, C -⚬ D) => A -⚬ B, g: (A -⚬ B, C -⚬ D) => C -⚬ D): (A -⚬ B, C -⚬ D)
Exported from CoreLib

Creates a pair of mutually recursive functions.

Creates a pair of mutually recursive functions.

Attributes

def rec3[A, B, C, D, E, F](fs: (A -⚬ B, C -⚬ D, E -⚬ F) => (A -⚬ B, C -⚬ D, E -⚬ F)): (A -⚬ B, C -⚬ D, E -⚬ F)
Exported from CoreLib
def rec3[A, B, C, D, E, F](f: (A -⚬ B, C -⚬ D, E -⚬ F) => A -⚬ B, g: (A -⚬ B, C -⚬ D, E -⚬ F) => C -⚬ D, h: (A -⚬ B, C -⚬ D, E -⚬ F) => E -⚬ F): (A -⚬ B, C -⚬ D, E -⚬ F)
Exported from CoreLib
def release[R, A, B](f: (R, A) => B): Res[R] |*| Val[A] -⚬ Val[B]
Exported from Scaletto

Releases a resource using the given function. The release function previously registered during resource acquisition is not used.

Releases a resource using the given function. The release function previously registered during resource acquisition is not used.

Type parameters

A

additional parameter of the release function

B

additional data produced by the release function

R

type of the resource

Value parameters

f

the release function

Attributes

def release[R]: Res[R] -⚬ Done
Exported from Scaletto

Releases a resource using the release function registered during resource acquisition.

Releases a resource using the release function registered during resource acquisition.

Attributes

def release0[R, B](release: R => B): Res[R] -⚬ Val[B]
Exported from ScalettoLib

Variant of release that does not take additional input.

Variant of release that does not take additional input.

Attributes

def releaseAsync[R, A, B](f: (R, A) => Async[B]): Res[R] |*| Val[A] -⚬ Val[B]
Exported from Scaletto
def releaseAsync0[R, B](release: R => Async[B]): Res[R] -⚬ Val[B]
Exported from ScalettoLib

Variant of releaseAsync that does not take additional input.

Variant of releaseAsync that does not take additional input.

Attributes

def releaseWith[R, A, B](f: ScalaFun[(R, A), B]): Res[R] |*| Val[A] -⚬ Val[B]
Exported from Scaletto
def select[A, B](using A: Negative[A], B: Negative[B]): A |*| B |&| A |*| B -⚬ A |*| B
Exported from CoreLib
def selectAgainstL[A](using A: Negative[A]): A |&| A -⚬ Need |*| A
Exported from CoreLib
def selectAgainstR[A](using A: Negative[A]): A |&| A -⚬ A |*| Need
Exported from CoreLib
def selectBy[A](notify: Pong |*| A -⚬ A): A |*| A |&| A |*| A -⚬ A |*| A
Exported from CoreLib
def selectBy[A, B](notifyA: Pong |*| A -⚬ A, notifyB: Pong |*| B -⚬ B): A |*| B |&| A |*| B -⚬ A |*| B
Exported from CoreLib
Exported from CoreLib

Races two Need signals, i.e. signals traveling in the negative direction (i.e. opposite the -⚬ arrow). Based on which Need signal from the out-port wins the race, selects one of the two Need signals from the in-port:

Races two Need signals, i.e. signals traveling in the negative direction (i.e. opposite the -⚬ arrow). Based on which Need signal from the out-port wins the race, selects one of the two Need signals from the in-port:

  • If the first signal from the out-port wins the race, selects the left signal from the in-port and pipes to it the remaining (i.e. the right) signal from the out-port.
  • If the second signal from the out-port wins the race, selects the right signal from the in-port and pipes to it the reamining (i.e. the left) signal from the out-port. It is biased to the left: if both signals from the out-port have arrived by the time of inquiry, selects the left signal from the in-port.

Attributes

Exported from CoreDSL

Races the two Pong signals (traveling from right to left). Chooses left if the first signal wins and right if the second signal wins. It is biased to the left: if both signals have arrived by the time of inquiry, chooses left.

Races the two Pong signals (traveling from right to left). Chooses left if the first signal wins and right if the second signal wins. It is biased to the left: if both signals have arrived by the time of inquiry, chooses left.

Attributes

def sequence[A : Positive, B : Positive]: A |*| B -⚬ A |*| B
Exported from CoreLib

Alias for sequence_PP.

Alias for sequence_PP.

Attributes

def sequence_NN[A, B](using A: Negative[A], B: Negative[B]): A |*| B -⚬ A |*| B
Exported from CoreLib
def sequence_NP[A, B](using A: Negative[A], B: Positive[B]): A |*| B -⚬ A |*| B
Exported from CoreLib
def sequence_PN[A, B](using A: Positive[A], B: Negative[B]): A |*| B -⚬ A |*| B
Exported from CoreLib
def sequence_PP[A, B](using A: Positive[A], B: Positive[B]): A |*| B -⚬ A |*| B
Exported from CoreLib
def signalDone[A](using A: Positive[A]): A -⚬ A |*| Done
Exported from CoreLib
def signalNegFst[A](using A: Negative[A]): Need |*| A -⚬ A
Exported from CoreLib
def signalNegSnd[A](using A: Negative[A]): A |*| Need -⚬ A
Exported from CoreLib
def signalPosFst[A](using A: Positive[A]): A -⚬ Done |*| A
Exported from CoreLib
def signalPosSnd[A](using A: Positive[A]): A -⚬ A |*| Done
Exported from CoreLib
Exported from ScalettoLib
Exported from ScalettoLib
export signalingNeg[A]
Exported from ScalettoLib
export signalingVal[A]
Exported from ScalettoLib
def snd[A, B, C](f: B -⚬ C): A |*| B -⚬ A |*| C
Exported from CoreDSL
def split[A : Cosemigroup]: A -⚬ A |*| A
Exported from CoreLib
def splitResource[R, A, S, T, B](f: (R, A) => (S, T, B), release1: Option[S => Unit], release2: Option[T => Unit]): Res[R] |*| Val[A] -⚬ Res[S] |*| Res[T] |*| Val[B]
Exported from Scaletto
def splitResource[R, A, S, T, B](f: ScalaFun[(R, A), (S, T, B)], release1: Option[ScalaFun[S, Unit]], release2: Option[ScalaFun[T, Unit]]): Res[R] |*| Val[A] -⚬ Res[S] |*| Res[T] |*| Val[B]
Exported from Scaletto
def splitResource0[R, S, T](f: R => (S, T), release1: Option[S => Unit], release2: Option[T => Unit]): Res[R] -⚬ Res[S] |*| Res[T]
Exported from ScalettoLib
def splitResource0[R, S, T](f: ScalaFun[R, (S, T)], release1: Option[ScalaFun[S, Unit]], release2: Option[ScalaFun[T, Unit]]): Res[R] -⚬ Res[S] |*| Res[T]
Exported from ScalettoLib
def splitResourceAsync[R, A, S, T, B](f: (R, A) => Async[(S, T, B)], release1: Option[S => Async[Unit]], release2: Option[T => Async[Unit]]): Res[R] |*| Val[A] -⚬ Res[S] |*| Res[T] |*| Val[B]
Exported from Scaletto
def splitResourceAsync0[R, S, T](f: R => Async[(S, T)], release1: Option[S => Async[Unit]], release2: Option[T => Async[Unit]]): Res[R] -⚬ Res[S] |*| Res[T]
Exported from ScalettoLib
Exported from CoreDSL
Exported from CoreDSL
def subordinateFst[A, B, C, D]: A |*| B |&| C |*| D -⚬ A |+| C |*| B |&| D
Exported from CoreLib

Present a choice between two pairs ((A |*| B) |&| (C |*| D)) as a choice (B |&| D) between the second parts of the respective pairs and on the side provide the other part of the chosen input pair, i.e. either A or C (A |+| C).

Present a choice between two pairs ((A |*| B) |&| (C |*| D)) as a choice (B |&| D) between the second parts of the respective pairs and on the side provide the other part of the chosen input pair, i.e. either A or C (A |+| C).

Attributes

def subordinateSnd[A, B, C, D]: A |*| B |&| C |*| D -⚬ A |&| C |*| B |+| D
Exported from CoreLib

Present a choice between two pairs ((A |*| B) |&| (C |*| D)) as a choice (A |&| C) between the first parts of the respective pairs and on the side provide the other part of the chosen input pair, i.e. either B or D (B |+| D).

Present a choice between two pairs ((A |*| B) |&| (C |*| D)) as a choice (A |&| C) between the first parts of the respective pairs and on the side provide the other part of the chosen input pair, i.e. either B or D (B |+| D).

Attributes

def supply[A]: A |*| -[A] -⚬ One
Exported from InvertDSL

Uses the resource from the first in-port to satisfy the demand from the second in-port. Alias for backvert.

Uses the resource from the first in-port to satisfy the demand from the second in-port. Alias for backvert.

Attributes

def swap[A, B]: A |*| B -⚬ B |*| A
Exported from CoreDSL
def testByVals[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]], pred: (K, K) => Boolean): A |*| B -⚬ A |*| B |+| A |*| B
Exported from ScalettoLib
def toChoiceOfDemands[A, B]: -[A |+| B] -⚬ -[A] |&| -[B]
Exported from InvertDSL

Converts demand for either to a choice of which side to supply. Alias for distributeInversionInto_|+|.

Converts demand for either to a choice of which side to supply. Alias for distributeInversionInto_|+|.

Attributes

def toScalaList[A]: LList[Val[A]] -⚬ Val[List[A]]
Exported from ScalettoLib
def toScalaList1[A]: LList1[Val[A]] -⚬ Val[::[A]]
Exported from ScalettoLib
def transformResource[R, A, S, B](f: (R, A) => (S, B), release: Option[S => Unit]): Res[R] |*| Val[A] -⚬ Res[S] |*| Val[B]
Exported from Scaletto

Transforms a resource into a resource of (possibly) different type.

Transforms a resource into a resource of (possibly) different type.

Type parameters

A

additional parameter of the transformation

B

additional output of the transformation

R

type of the input resource

S

type of the output resource

Value parameters

f

the transformation function. It receives the input resource and additional input of type A. It returns the new resource and additional output of type B.

release

called to release the new resource in case of a crash. None means no cleanup is needed

Attributes

def transformResource0[R, S](f: R => S, release: Option[S => Unit]): Res[R] -⚬ Res[S]
Exported from ScalettoLib

Variant of transformResource that does not take additional input and does not produce additional output.

Variant of transformResource that does not take additional input and does not produce additional output.

Attributes

def transformResourceAsync[R, A, S, B](f: (R, A) => Async[(S, B)], release: Option[S => Async[Unit]]): Res[R] |*| Val[A] -⚬ Res[S] |*| Val[B]
Exported from Scaletto
def transformResourceAsync0[R, S](f: R => Async[S], release: Option[S => Async[Unit]]): Res[R] -⚬ Res[S]
Exported from ScalettoLib

Variant of transformResourceAsync that does not take additional input and does not produce additional output.

Variant of transformResourceAsync that does not take additional input and does not produce additional output.

Attributes

def tryAcquire[A, R, B, E](acquire: ScalaFun[A, Either[E, (R, B)]], release: Option[ScalaFun[R, Unit]]): Val[A] -⚬ Val[E] |+| Res[R] |*| Val[B]
Exported from Scaletto
def tryAcquire[A, R, B, E](acquire: A => Either[E, (R, B)], release: Option[R => Unit]): Val[A] -⚬ Val[E] |+| Res[R] |*| Val[B]
Exported from Scaletto

Acquires a resource of type R. Might fail with an error of type E.

Acquires a resource of type R. Might fail with an error of type E.

Type parameters

A

parameters of the acquire function

B

additional data produced by acquiring the resource

E

type of the error

R

type of the resource

Value parameters

release

called to release the resource in case of a crash. None means no cleanup is needed

Attributes

def tryEffectAcquire[R, A, S, B, E](f: ScalaFun[(R, A), Either[E, (S, B)]], release: Option[ScalaFun[S, Unit]]): Res[R] |*| Val[A] -⚬ Res[R] |*| Val[E] |+| Res[S] |*| Val[B]
Exported from Scaletto
def tryEffectAcquireWr[R, A, S, E](f: ScalaFun[(R, A), Either[E, S]], release: Option[ScalaFun[S, Unit]]): Res[R] |*| Val[A] -⚬ Res[R] |*| Val[E] |+| Res[S]
Exported from ScalettoLib
def trySplitResource[R, A, S, T, B, E](f: (R, A) => Either[E, (S, T, B)], release1: Option[S => Unit], release2: Option[T => Unit]): Res[R] |*| Val[A] -⚬ Val[E] |+| Res[S] |*| Res[T] |*| Val[B]
Exported from Scaletto
def trySplitResource[R, A, S, T, B, E](f: ScalaFun[(R, A), Either[E, (S, T, B)]], release1: Option[ScalaFun[S, Unit]], release2: Option[ScalaFun[T, Unit]]): Res[R] |*| Val[A] -⚬ Val[E] |+| Res[S] |*| Res[T] |*| Val[B]
Exported from Scaletto
def trySplitResourceAsync[R, A, S, T, B, E](f: (R, A) => Async[Either[E, (S, T, B)]], release1: Option[S => Async[Unit]], release2: Option[T => Async[Unit]]): Res[R] |*| Val[A] -⚬ Val[E] |+| Res[S] |*| Res[T] |*| Val[B]
Exported from Scaletto
def tryTransformResource[R, A, S, B, E](f: (R, A) => Either[E, (S, B)], release: Option[S => Unit]): Res[R] |*| Val[A] -⚬ Val[E] |+| Res[S] |*| Val[B]
Exported from Scaletto

Transforms a resource into a resource of (possibly) different type. Might fail with an error of type E.

Transforms a resource into a resource of (possibly) different type. Might fail with an error of type E.

Type parameters

A

additional parameter of the transformation

B

additional output of the transformation

E

type of the error

R

type of the input resource

S

type of the output resource

Value parameters

f

the transformation function. It receives the input resource and additional input of type A. It returns either an error of type E or the new resource and additional output of type B. In case the transformation results in an error, the original resource is ''not'' released automatically— the passing of the original resource R to the transformation function f indicates transfer of responsibility for the resource to the function f.

release

called to release the new resource in case of a crash. None means no cleanup is needed

Attributes

def tryTransformResource[R, A, S, B, E](f: ScalaFun[(R, A), Either[E, (S, B)]], release: Option[ScalaFun[S, Unit]]): Res[R] |*| Val[A] -⚬ Val[E] |+| Res[S] |*| Val[B]
Exported from Scaletto
def tryTransformResourceAsync[R, A, S, B, E](f: (R, A) => Async[Either[E, (S, B)]], release: Option[S => Async[Unit]]): Res[R] |*| Val[A] -⚬ Val[E] |+| Res[S] |*| Val[B]
Exported from Scaletto
def unContrapositive[A, B](f: -[A] -⚬ -[B]): B -⚬ A
Exported from InvertDSL
def unInvertClosure[A, B]: A =⚬ B -⚬ -[B =⚬ A]
Exported from InvertDSL
Exported from InvertDSL
def uncurry[A, B, C](f: A -⚬ B =⚬ C): A |*| B -⚬ C
Exported from ClosedDSL
def unliftBoolean: Bool -⚬ Val[Boolean]
Exported from ScalettoLib
def unliftEither[A, B]: Val[A] |+| Val[B] -⚬ Val[Either[A, B]]
Exported from Scaletto
def unliftNegPair[A, B]: Neg[A] |*| Neg[B] -⚬ Neg[(A, B)]
Exported from Scaletto
def unliftPair[A, B]: Val[A] |*| Val[B] -⚬ Val[(A, B)]
Exported from Scaletto
def unpack[F[_]]: Rec[F] -⚬ F[Rec[F]]
Exported from CoreDSL

Unpacks one level of a recursive type definition.

Unpacks one level of a recursive type definition.

Attributes

def unpackDemand[F[_]]: -[Rec[F]] -⚬ -[F[Rec[F]]]
Exported from InvertDSL
def unveilSequentially[A, Ā, B](using ev: Dual[A, Ā]): A |*| B -⚬ Ā =⚬ B
Exported from ClosedLib

Given A and B concurrently (A |*| B), we can suggest that A be consumed before B by turning it into Ā =⚬ B, where Ā is the dual of A.

Given A and B concurrently (A |*| B), we can suggest that A be consumed before B by turning it into Ā =⚬ B, where Ā is the dual of A.

Attributes

export valNegDuality[A]
Exported from ScalettoLib
def zapPremises[A, Ā, B, C](using ev: Dual[A, Ā]): A =⚬ B |*| Ā =⚬ C -⚬ B |*| C
Exported from ClosedLib
final type |&| = |&|
Exported from CoreDSL
final val |&|: |&|.type
Exported from CoreLib
Exported from InvertDSL
final type |*| = |*|
Exported from CoreDSL
final type |+| = |+|
Exported from CoreDSL
final val |+|: |+|.type
Exported from CoreLib
def ΛI[A, B, C, D](f: A -⚬ B |*| C): A |*| D -⚬ B |*| C |*| D
Exported from CoreLib

Λ is the uppercase Greek letter lambda.

Λ is the uppercase Greek letter lambda.

Attributes

override val λ: LambdaOpsWithClosures
Exported from ClosedDSL
final type = |+|
Exported from CoreDSL
final type = |*|
Exported from CoreDSL