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
object StarterKit.type

Members list

Concise view

Value members

Concrete methods

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

Extensions

Extensions

extension [A, B](a: $[A])
final def blockUntil(b: $[Ping]): $[A]
final def deferUntil(b: $[Ping])(implicit A: Positive[A]): $[A]
final def sequence(f: Done -⚬ B)(implicit A: Positive[A]): $[A |*| B]
final def sequence(b: $[B])(implicit A: Positive[A], B: Positive[B]): $[A |*| B]
final def sequenceAfter(b: $[B])(implicit A: Positive[A], B: Positive[B]): $[A |*| B]
final def waitFor(b: $[Done])(implicit A: Positive[A]): $[A]
extension [A](a: $[Val[A]])
final def *[B](b: $[Val[B]]): $[Val[(A, B)]]
extension [A](a: $[Detained[A]])
final def releaseWhen(trigger: $[Done]): $[A]
extension [A](a: $[Deferred[A]])
final def resumeWhen(trigger: $[Ping]): $[A]
extension (acquiredLock: $[AcquiredLock])
final def deferReleaseUntil(ping: $[Ping]): $[AcquiredLock]
final def detainReleaseUntil(done: $[Done]): $[AcquiredLock]
extension [A, C](f: A -⚬ C)
final def \/[B](g: B -⚬ C)(using x$3: Semigroup[C]): A |*| B -⚬ C
extension [A, B](f: A -⚬ B)
final def /\[C](g: A -⚬ C)(using x$3: Cosemigroup[A]): A -⚬ B |*| C

Exports

Defined exports

override val $: FunExprOps
Exported from ClosedDSL
final type $ = $
Exported from CoreDSL
final type $Ops = $Ops
Exported from CoreDSL
final type - = -
Exported from InvertDSL
final type -⚬ = -⚬
Exported from CoreDSL
final type =⚬ = =⚬
Exported from InvertDSL
final val AcquiredLock: AcquiredLock.type
Exported from CoreLib
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 type BimapSyntax = [F[_, _], A, B] =>> BimapSyntax[F, A, B]
Exported from CoreLib
final val Bool: Bool.type
Exported from CoreLib
final type Bool = Bool
Exported from CoreLib
final implicit def ClosedLinearFunctionOps[A, B](self: A -⚬ B): ClosedLinearFunctionOps[A, B]
Exported from ClosedLib
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
final type Consumer = Consumer
Exported from ScalettoStreams
final type ConsumerF = ConsumerF
Exported from ScalettoStreams
Exported from CoreLib
final type ContraExternalizer = [F[_]] =>> ContraExternalizer[F]
Exported from CoreLib
Exported from CoreLib
final type ContraFunctor = [F[_]] =>> ContraFunctor[F]
Exported from CoreLib
final val Cosemigroup: Cosemigroup.type
Exported from CoreDSL
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 implicit def DemandExprOps[B](expr: $[-[B]]): DemandExprOps[B]
Exported from InvertDSL
Exported from InvertDSL
final val Demanding: Demanding.type
Exported from ScalettoStreams
final type Demanding = Demanding
Exported from ScalettoStreams
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
final type FocusedOnChoiceContra = [A, F[_], B1, B2] =>> FocusedOnChoiceContra[A, F, B1, B2]
Exported from CoreLib
final type FocusedOnDoneTimesCo = [F[_], B2] =>> FocusedOnDoneTimesCo[F, B2]
Exported from CoreLib
final implicit def FocusedOnFunctionCo[F[_], A, B](f: FocusedCo[F, A =⚬ B]): FocusedOnFunctionCo[F, A, B]
Exported from ClosedLib
final type FocusedOnFunctionCo = [F[_], A, B] =>> FocusedOnFunctionCo[F, A, B]
Exported from ClosedLib
final implicit def FocusedOnFunctionContra[F[_], A, B](f: FocusedContra[F, A =⚬ B]): FocusedOnFunctionContra[F, A, B]
Exported from ClosedLib
final type FocusedOnFunctionContra = [F[_], A, B] =>> FocusedOnFunctionContra[F, A, B]
Exported from ClosedLib
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
final type FocusedOnPlusContra = [A, F[_], B1, B2] =>> FocusedOnPlusContra[A, F, B1, B2]
Exported from CoreLib
final type FocusedOnTimesDoneCo = [F[_], B1] =>> FocusedOnTimesDoneCo[F, B1]
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 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 LDemanding: LDemanding.type
Exported from CoreStreams
final type LDemanding = LDemanding
Exported from CoreStreams
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 val LPollable: LPollable.type
Exported from CoreStreams
final type LPollable = LPollable
Exported from CoreStreams
final type LPollableF = LPollableF
Exported from CoreStreams
final val LPolled: LPolled.type
Exported from CoreStreams
final type LPolled = LPolled
Exported from CoreStreams
final val LSubscriber: LSubscriber.type
Exported from CoreStreams
Exported from CoreStreams
Exported from CoreStreams
final type LTerminus = LTerminus
Exported from CoreDSL
final type LambdaOps = LambdaOps
Exported from CoreDSL
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 implicit def LinearFunctionToPairOps[A, B1, B2](self: A -⚬ B1 |*| B2): LinearFunctionToPairOps[A, B1, B2]
Exported from CoreLib
final implicit def LinearFunctionToPlusOps[A, B1, B2](self: A -⚬ B1 |+| B2): LinearFunctionToPlusOps[A, B1, B2]
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
final type One = One
Exported from CoreDSL
final val Optionally: Optionally.type
Exported from CoreLib
final type Optionally = Optionally
Exported from CoreLib
final val PAffine: PAffine.type
Exported from CoreLib
final type PAffine = PAffine
Exported from CoreLib
final val PComonoid: PComonoid.type
Exported from CoreLib
final type PComonoid = PComonoid
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 val Pollable: Pollable.type
Exported from ScalettoStreams
final type Pollable = Pollable
Exported from ScalettoStreams
final type PollableF = PollableF
Exported from ScalettoStreams
final val Polled: Polled.type
Exported from ScalettoStreams
final type Polled = Polled
Exported from ScalettoStreams
final type Pong = Pong
Exported from CoreDSL
final type Producing = Producing
Exported from ScalettoStreams
final type ProducingF = ProducingF
Exported from ScalettoStreams
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
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 Subscriber: Subscriber.type
Exported from ScalettoStreams
final type Subscriber = Subscriber
Exported from ScalettoStreams
Exported from ScalettoStreams
final val Transportive: Transportive.type
Exported from CoreLib
final type Transportive = [F[_]] =>> Transportive[F]
Exported from CoreLib
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 ValMatcher: ValMatcher.type
Exported from ScalettoLib
final type ValMatcher = [U >: V, V, A, R] =>> ValMatcher[U, V, A, R]
Exported from ScalettoLib
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.

Attributes

A

parameters of the acquire function

B

additional data produced by acquiring the resource

R

type of the resource

release

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

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](implicit 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](implicit 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](implicit 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](implicit 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](implicit 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](implicit 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 implementation must ensure that the blocking operation does not impede any of the concurrently happening non-blocking computations.

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

Attributes

Exported from CoreLib
def choice[A, B, C](caseLeft: A -⚬ B, caseRight: A -⚬ C): A -⚬ B |&| C
Exported from CoreDSL
Exported from CoreLib
implicit def choiceEitherDuality[A, B, Ȧ, ](implicit a: Dual[A, Ȧ], b: Dual[B, ]): Dual[A |&| B, Ȧ |+| ]
Exported from CoreLib
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
Exported from CoreLib
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
Exported from CoreLib
Exported from CoreLib
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
implicit def comparableVal[A](implicit A: Ordering[A]): Comparable[Val[A], Val[A]]
Exported from ScalettoLib
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
Exported from ScalettoStreams
Exported from InvertLib
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 defer[A](using A: Positive[A]): A -⚬ Deferred[A]
Exported from CoreLib
def delay: Val[FiniteDuration] -⚬ Done
Exported from Scaletto
def delayChoiceAndSidesUntilDone[A, B](implicit A: Positive[A], B: Positive[B]): Done |*| A |&| B -⚬ A |&| B
Exported from CoreLib
def delayChoiceAndSidesUntilNeed[A, B](implicit A: Negative[A], B: Negative[B]): A |&| B -⚬ Need |*| A |&| B
Exported from CoreLib
Exported from CoreLib
Exported from CoreLib
Exported from CoreLib
Exported from CoreLib
def delayEitherAndSidesUntilDone[A, B](implicit A: Positive[A], B: Positive[B]): Done |*| A |+| B -⚬ A |+| B
Exported from CoreLib
def delayEitherAndSidesUntilNeed[A, B](implicit A: Negative[A], B: Negative[B]): A |+| B -⚬ Need |*| A |+| B
Exported from CoreLib
Exported from CoreLib
Exported from CoreLib
Exported from CoreLib
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 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_|&|.

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

Attributes

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

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

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

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](implicit A: Comonoid[A]): A |*| B -⚬ B
Exported from CoreLib
def discardSnd[A, B](implicit 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

Exported from CoreDSL
implicit def doneNeedDuality: Dual[Done, Need]
Exported from CoreLib
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.

Attributes

A

additional parameter of the operation

B

additional output of the operation

R

type of the resource

f

the effectful operation

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 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 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
Exported from CoreLib
implicit def eitherChoiceDuality[A, B, Ȧ, ](implicit a: Dual[A, Ȧ], b: Dual[B, ]): Dual[A |+| B, Ȧ |&| ]
Exported from CoreLib
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
implicit def fstFunctor[B]: Transportive[|*|]
Exported from CoreLib
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](implicit A: Cosemigroup[A]): A |*| B -⚬ A |*| A |*| B
Exported from CoreLib
def getSnd[A, B](implicit B: Cosemigroup[B]): A |*| B -⚬ B |*| A |*| B
Exported from CoreLib
def id[A]: A -⚬ A
Exported from CoreDSL
implicit val idFunctor: Transportive[Id]
Exported from CoreLib
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
Exported from CoreLib
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
Exported from CoreLib
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 invertClosure[A, B]: -[A =⚬ B] -⚬ B =⚬ A
Exported from InvertDSL
def isEq[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
def isGt[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
def isGteq[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
def isLt[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
Exported from ScalettoLib
def isLteq[A](implicit 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
implicit def junctionNeg[A]: Negative[Neg[A]]
Exported from ScalettoLib
implicit def junctionVal[A]: Positive[Val[A]]
Exported from ScalettoLib
def lInvert[A, B](implicit 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 lInvertConsumerF[A, x, y](lInvertSub: One -⚬ y |*| x): One -⚬ ConsumerF[A, y] |*| ProducingF[A, x]
Exported from ScalettoStreams
def lInvertLPollable[A, B](lInvertElem: One -⚬ B |*| A): One -⚬ LPollable[A] |*| LSubscriber[B]
Exported from CoreStreams
def lInvertLPollableF[A, B, x, y](lInvertA: One -⚬ B |*| A, lInvertSub: One -⚬ y |*| x): One -⚬ LPollableF[A, x] |*| LSubscriberF[B, y]
Exported from CoreStreams
def lInvertPair[A, B, Ȧ, ](lInvertA: One -⚬ Ȧ |*| A, lInvertB: One -⚬ |*| B): One -⚬ Ȧ |*| |*| A |*| B
Exported from CoreLib
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

val lib: Lib & CoreLib[DSL]
Exported from CoreStreams
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 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.

Attributes

init

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

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 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
implicit def nMonoidNeg[A]: NMonoid[Neg[A]]
Exported from ScalettoLib
Exported from CoreDSL
implicit def negValDuality[A]: Dual[Neg[A], Val[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 (|&|) is made and if it is left, the left side notifies.

Notifies when the choice (|&|) 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 (|&|) is made and if it is left, the left side notifies using the given function.

Notifies when the choice (|&|) 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 (|&|) is made and if it is right, the right side notifies.

Notifies when the choice (|&|) 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 (|&|) is made and if it is right, the right side notifies using the given function.

Notifies when the choice (|&|) 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 (|&|) is made and the chosen side notifies.

Notifies when the choice (|&|) 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 (|&|) is made and the chosen side notifies using the respective given function.

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

Attributes

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

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

implicit def oneSelfDual: Dual[One, One]
Exported from CoreLib
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

implicit def pComonoidVal[A]: PComonoid[Val[A]]
Exported from ScalettoLib
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
implicit def pairDuality[A, B, Ȧ, ](implicit a: Dual[A, Ȧ], b: Dual[B, ]): Dual[A |*| B, Ȧ |*| ]
Exported from CoreLib
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
Exported from CoreDSL
implicit def pollableSubscriberDuality[A, B](implicit BA: Dual[B, A]): Dual[LPollable[B], LSubscriber[A]]
Exported from CoreStreams
Exported from CoreDSL
def pool[A : Positive]: LList1[A] -⚬ Unlimited[A |*| -[A]] |*| LList1[A]
Exported from InvertLib
def printLine[A](f: A => String): Val[A] -⚬ Done
Exported from ScalettoLib
def printLine: Val[String] -⚬ Done
Exported from ScalettoLib
Exported from ScalettoStreams
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](implicit 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 rInvertLSubscriber[A, B](rInvertElem: A |*| B -⚬ One): LSubscriber[B] |*| LPollable[A] -⚬ One
Exported from CoreStreams
def rInvertLSubscriberF[A, B, x, y](rInvertA: A |*| B -⚬ One, rInvertSub: x |*| y -⚬ One): LSubscriberF[B, y] |*| LPollableF[A, x] -⚬ One
Exported from CoreStreams
def rInvertPair[A, B, Ȧ, ](rInvertA: A |*| Ȧ -⚬ One, rInvertB: B |*| -⚬ One): A |*| B |*| Ȧ |*| -⚬ One
Exported from CoreLib
def rInvertProducingF[A, x, y](rInvertSub: x |*| y -⚬ One): ProducingF[A, x] |*| ConsumerF[A, y] -⚬ One
Exported from ScalettoStreams
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](implicit A: Positive[A], B: Positive[B]): A |*| B -⚬ A |*| B |+| A |*| B
Exported from CoreLib
def raceAgainstL[A](implicit A: Positive[A]): Done |*| A -⚬ A |+| A
Exported from CoreLib
def raceAgainstR[A](implicit A: Positive[A]): A |*| Done -⚬ 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 raceSignaledOrNot[A](implicit A: Positive[A]): A -⚬ A |+| A
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](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

Exported from ScalettoStreams

If either the source or the subscriber is completed, complete the other one and be done. Otherwise, expose their offer and demand, respectively.

If either the source or the subscriber is completed, complete the other one and be done. Otherwise, expose their offer and demand, respectively.

Attributes

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.

Attributes

A

additional parameter of the release function

B

additional data produced by the release function

R

type of the resource

f

the release function

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 select[A, B](implicit A: Negative[A], B: Negative[B]): A |*| B |&| A |*| B -⚬ A |*| B
Exported from CoreLib
def selectAgainstL[A](implicit A: Negative[A]): A |&| A -⚬ Need |*| A
Exported from CoreLib
def selectAgainstR[A](implicit A: Negative[A]): A |&| A -⚬ A |*| Need
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 selectSignaledOrNot[A](implicit A: Negative[A]): A |&| A -⚬ A
Exported from CoreLib
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
implicit def signalingNeg[A]: Negative[Neg[A]]
Exported from ScalettoLib
implicit def signalingVal[A]: Positive[Val[A]]
Exported from ScalettoLib
def snd[A, B, C](f: B -⚬ C): A |*| B -⚬ A |*| C
Exported from CoreDSL
implicit def sndFunctor[A]: Transportive[[x] =>> A |*| x]
Exported from CoreLib
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 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 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

implicit def subscriberPollableDuality[A, B](implicit AB: Dual[A, B]): Dual[LSubscriber[B], LPollable[A]]
Exported from CoreStreams
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 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.

Attributes

A

additional parameter of the transformation

B

additional output of the transformation

R

type of the input resource

S

type of the output resource

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

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: 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.

Attributes

A

parameters of the acquire function

B

additional data produced by acquiring the resource

E

type of the error

R

type of the resource

release

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

def tryAcquireAsync[A, R, B, E](acquire: A => Async[Either[E, (R, B)]], release: Option[R => Async[Unit]]): Val[A] -⚬ Val[E] |+| Res[R] |*| Val[B]
Exported from Scaletto
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 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.

Attributes

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

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

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
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](implicit 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

implicit def valNegDuality[A]: Dual[Val[A], Neg[A]]
Exported from ScalettoLib
def zapPremises[A, Ā, B, C](implicit ev: Dual[A, Ā]): A =⚬ B |*| Ā =⚬ C -⚬ B |*| C
Exported from ClosedLib
final type |&| = |&|
Exported from CoreDSL
final val |&|: |&|.type
Exported from CoreLib
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

Exported from ClosedDSL
final type = |+|
Exported from CoreDSL
final type = |*|
Exported from CoreDSL