CoreLib

class CoreLib[DSL <: CoreDSL](val dsl: DSL)
Companion
object
class Object
trait Matchable
class Any

Type members

Classlikes

trait Affine[A]
Companion
object
object Affine
Companion
class
trait BiExternalizer[F[_, _]]
trait Bifunctor[F[_, _]]

Witnesses that F is a bifunctor (covariant in both variables).

Witnesses that F is a bifunctor (covariant in both variables).

Companion
object
object Bifunctor
Companion
class
class BimapSyntax[F[_, _], A, B](self: A -⚬ B)
object Bool
trait Comonad[F[_]]
trait Comonoid[A] extends Cosemigroup[A] with Affine[A]
Companion
object
object Comonoid
Companion
class
trait Comparable[A, B]
object Compared
trait ContraExternalizer[F[_]]

Contravariant functor from category -⚬ to the category => of Scala functions. It takes a morphism A -⚬ B internal to the DSL and maps it to a morphism F[B] => F[A] in the meta language (Scala), i.e. external to the DSL.

Contravariant functor from category -⚬ to the category => of Scala functions. It takes a morphism A -⚬ B internal to the DSL and maps it to a morphism F[B] => F[A] in the meta language (Scala), i.e. external to the DSL.

Companion
object
Companion
class
trait ContraFunctor[F[_]]

Witnesses that F is a contravariant endofunctor on the category -⚬.

Witnesses that F is a contravariant endofunctor on the category -⚬.

trait Cosemigroup[A]
Companion
object
object Cosemigroup
Companion
class
object Deferrable
object Delayed
trait Dual[A, B]

Evidence that A flowing in one direction is equivalent to to B flowing in the opposite direction. It must hold that

Evidence that A flowing in one direction is equivalent to to B flowing in the opposite direction. It must hold that

       ┏━━━━━┓                         ┏━━━━━┓
       ┞─┐ r ┃                         ┃  l  ┞─┐
       ╎A│ I ┃                         ┃  I  ╎B│
       ┟─┘ n ┃                         ┃  n  ┟─┘
 ┏━━━━━┫   v ┃     ┏━━━━━━━━━┓         ┃  v  ┣━━━━━┓     ┏━━━━━━━━━┓
 ┃  l  ┞─┐ e ┃     ┞─┐       ┞─┐       ┃  e  ┞─┐ r ┃     ┞─┐       ┞─┐
 ┃  I  ╎B│ r ┃  =  ╎A│ id[A] ╎A│       ┃  r  ╎A│ I ┃  =  ╎B│ id[B] ╎B│
 ┃  n  ┟─┘ t ┃     ┟─┘       ┟─┘       ┃  t  ┟─┘ n ┃     ┟─┘       ┟─┘
 ┃  v  ┣━━━━━┛     ┗━━━━━━━━━┛         ┗━━━━━┫   v ┃     ┗━━━━━━━━━┛
 ┃  e  ┞─┐                                   ┞─┐ e ┃
 ┃  r  ╎A│                                   ╎B│ r ┃
 ┃  t  ┟─┘                                   ┟─┘ t ┃
 ┗━━━━━┛                                     ┗━━━━━┛
Companion
object
object Dual
Companion
class
trait Dual1[F[_], G[_]]

Evidence that if A is dual to B, then F[A] is dual to G[B].

Evidence that if A is dual to B, then F[A] is dual to G[B].

object Endless
trait Externalizer[F[_]]

Functor from category -⚬ to the category => of Scala functions. It takes a morphism A -⚬ B internal to the DSL and maps it to a morphism F[A] => F[B] in the meta language (Scala), i.e. external to the DSL.

Functor from category -⚬ to the category => of Scala functions. It takes a morphism A -⚬ B internal to the DSL and maps it to a morphism F[A] => F[B] in the meta language (Scala), i.e. external to the DSL.

Companion
object
object Externalizer
Companion
class
class FocusedBi[F[_, _], B1, B2](f: F[B1, B2])(F: BiExternalizer[F])
class FocusedCo[F[_], B](f: F[B])(F: Externalizer[F])

Focused on B in F[B], where B is in a covariant position.

Focused on B in F[B], where B is in a covariant position.

class FocusedContra[F[_], B](f: F[B])(F: ContraExternalizer[F])

Focused on B in the output F[B] of linear function A -⚬ F[B], where B is in a contravariant position.

Focused on B in the output F[B] of linear function A -⚬ F[B], where B is in a contravariant position.

class FocusedOnChoiceCo[F[_], B1, B2](f: FocusedCo[F, B1 |&| B2])
class FocusedOnChoiceContra[A, F[_], B1, B2](f: FocusedContra[F, B1 |&| B2])
class FocusedOnDoneTimesCo[F[_], B2](f: FocusedCo[F, Done |*| B2])(j: Positive[B2])
class FocusedOnPairCo[F[_], B1, B2](f: FocusedCo[F, B1 |*| B2])
class FocusedOnPairContra[A, F[_], B1, B2](f: FocusedContra[F, B1 |*| B2])
class FocusedOnPlusCo[F[_], B1, B2](f: FocusedCo[F, B1 |+| B2])
class FocusedOnPlusContra[A, F[_], B1, B2](f: FocusedContra[F, B1 |+| B2])
class FocusedOnTimesDoneCo[F[_], B1](f: FocusedCo[F, B1 |*| Done])(j: Positive[B1])
trait Functor[F[_]]

Witnesses that F is a covariant endofunctor on the category -⚬.

Witnesses that F is a covariant endofunctor on the category -⚬.

trait Getter[S, A]
Companion
object
object Getter
Companion
class
object Junction
object LList
object LList1
trait Lens[S, A] extends Getter[S, A]
Companion
object
object Lens
Companion
class
class LinearFunctionOps[A, B](self: A -⚬ B)
class LinearFunctionToPairOps[A, B1, B2](self: A -⚬ B1 |*| B2)
class LinearFunctionToPlusOps[A, B1, B2](self: A -⚬ B1 |+| B2)
object Maybe
trait Monad[F[_]]
trait Monoid[A] extends Semigroup[A]
Companion
object
object Monoid
Companion
class
object Multiple
trait NAffine[A]
Companion
object
object NAffine
Companion
class
trait NComonoid[A] extends Cosemigroup[A] with NAffine[A]

A Comonoid whose counit can be chained before a signal flowing in the '''N'''egative direction (Need), effectively taking on the responsibility to await completion of some computation.

A Comonoid whose counit can be chained before a signal flowing in the '''N'''egative direction (Need), effectively taking on the responsibility to await completion of some computation.

The dual of PMonoid.

trait NMonoid[A] extends Semigroup[A]

A weaker version of Monoid whose unit creates a liability - a signal traveling in the '''N'''egative direction (Need) that eventually needs to be awaited.

A weaker version of Monoid whose unit creates a liability - a signal traveling in the '''N'''egative direction (Need) that eventually needs to be awaited.

Its dual is PComonoid.

Companion
object
object NMonoid
Companion
class
object Optionally
trait PAffine[A]
Companion
object
object PAffine
Companion
class
trait PComonoid[A] extends Cosemigroup[A] with PAffine[A]

A weaker version of Comonoid whose counit cannot discard the input completely, but can reduce it to a signal traveling in the '''P'''ositive direction (Done) that eventually needs to be awaited.

A weaker version of Comonoid whose counit cannot discard the input completely, but can reduce it to a signal traveling in the '''P'''ositive direction (Done) that eventually needs to be awaited.

The dual of NMonoid.

Companion
object
object PComonoid
Companion
class
object PMaybe
trait PMonoid[A] extends Semigroup[A]

A Monoid whose unit can be chained after a signal flowing in the '''P'''ositive direction (Done), effectively taking on the responsibility to wait for completion of some computation.

A Monoid whose unit can be chained after a signal flowing in the '''P'''ositive direction (Done), effectively taking on the responsibility to wait for completion of some computation.

Its dual is NComonoid.

object PUnlimited
trait Semigroup[A]
Companion
object
object Semigroup
Companion
class
object Signaling
trait Transportive[F[_]] extends Functor[F]
object Unlimited
object |&|
object |*|
object |+|

Types

opaque type Bool
opaque type Delayed[A]

A type alias expressing the ''intent'' that A is delayed (in some sense) until a signal (Need) is received. Equivalent to Done =⚬ A, but the formulation as Need |*| A does not rely on the more powerful concept of ''function types'' (internal hom objects), i.e. does not require ClosedDSL.

A type alias expressing the ''intent'' that A is delayed (in some sense) until a signal (Need) is received. Equivalent to Done =⚬ A, but the formulation as Need |*| A does not rely on the more powerful concept of ''function types'' (internal hom objects), i.e. does not require ClosedDSL.

opaque type Endless[A]

An endless source of elements, where the consumer decides whether to pull one more element or close. Dual to LList, in which the producer decides how many elements will be produced.

An endless source of elements, where the consumer decides whether to pull one more element or close. Dual to LList, in which the producer decides how many elements will be produced.

type Id[A] = A
opaque type LList[T]
opaque type LList1[T]

Non-empty list, i.e. a list with at least one element.

Non-empty list, i.e. a list with at least one element.

opaque type Maybe[A]
opaque type Multiple[A]

Zero or more instances of A. The exact multiplicity is determined by the producer.

Zero or more instances of A. The exact multiplicity is determined by the producer.

Similar to LList, but unlike LList, the producer of Multiple is not required to unveil the elements sequentially. There are many different representations (in fact an infinite number) of the same sequence of elements of type A as Multiple[A], while there is only one representation of that sequence as LList[A].

opaque type Optionally[A]
opaque type PMaybe[A]
opaque type PUnlimited[A]
opaque type Unlimited[A]

Unlimited supply of As. The consumer chooses how many As to consume.

Unlimited supply of As. The consumer chooses how many As to consume.

Value members

Concrete methods

def IV[A, B, C, D](f: B |*| C -⚬ D): A |*| B |*| C -⚬ A |*| D
def IX[A, B, C]: A |*| B |*| C -⚬ A |*| C |*| B
def IXI[A, B, C, D]: A |*| B |*| C |*| D -⚬ A |*| C |*| B |*| D
def VI[A, B, C, D](f: A |*| B -⚬ D): A |*| B |*| C -⚬ D |*| C
def XI[A, B, C]: A |*| B |*| C -⚬ B |*| A |*| C
def `IΛ`[A, B, C, D](f: B -⚬ C |*| D): A |*| B -⚬ A |*| C |*| D

Λ is the uppercase Greek letter lambda.

Λ is the uppercase Greek letter lambda.

def `ΛI`[A, B, C, D](f: A -⚬ B |*| C): A |*| D -⚬ B |*| C |*| D

Λ is the uppercase Greek letter lambda.

Λ is the uppercase Greek letter lambda.

def awaitChooseL[A, B](A: Negative[A]): A |&| B -⚬ Need |*| A

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.

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

Analogous to awaitChooseL, but chooses the right side.

Analogous to awaitChooseL, but chooses the right side.

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

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.

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

Analogous to joinInjectL, but injects to the right.

Analogous to joinInjectL, but injects to the right.

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

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

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

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

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

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

def awaitPosFst[A](A: Positive[A]): Done |*| A -⚬ A
def awaitPosSnd[A](A: Positive[A]): A |*| Done -⚬ A
def chooseLOnPing[A, B]: Ping |*| A |&| B -⚬ A
def chooseLWhenDone[A, B]: Done |*| A |&| B -⚬ Done |*| A
def chooseLWhenNeed[A, B]: Need |*| A |&| B -⚬ Need |*| A
def chooseROnPing[A, B]: Ping |*| A |&| B -⚬ B
def chooseRWhenDone[A, B]: Done |*| A |&| B -⚬ Done |*| B
def chooseRWhenNeed[A, B]: A |&| Need |*| B -⚬ Need |*| B
def compareBy[A, B, K1, K2](aKey: Getter[A, K1], bKey: Getter[B, K2])(`evidence$17`: PComonoid[K1], `evidence$18`: Positive[K1], `evidence$19`: PComonoid[K2], `evidence$20`: Positive[K2], cmp: Comparable[K1, K2]): A |*| B -⚬ Compared[A, B]
def delayChoiceUntilPing[A, B]: Ping |*| A |&| B -⚬ A |&| B
def delayChoiceUntilPong[A, B]: A |&| B -⚬ Pong |*| A |&| B
def delayEitherUntilPing[A, B]: Ping |*| A |+| B -⚬ A |+| B
def delayEitherUntilPong[A, B]: A |+| B -⚬ Pong |*| A |+| B
def delayUsing[A](f: Done -⚬ Done)(A: Positive[A]): A -⚬ A
def delayUsing[A](f: Need -⚬ Need)(A: Negative[A]): A -⚬ A
def discardFst[A, B](A: Comonoid[A]): A |*| B -⚬ B
def discardSnd[A, B](B: Comonoid[B]): A |*| B -⚬ A
def dualRec[F[_], G[_]](ev: Dual1[F, G]): Dual[Rec[F], Rec[G]]

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

def dualSymmetric[A, B](ev: Dual[A, B]): Dual[B, A]
def fst[A, B, C](f: A -⚬ B): A |*| C -⚬ B |*| C
def getFst[A, B](A: Cosemigroup[A]): A |*| B -⚬ A |*| A |*| B
def getSnd[A, B](B: Cosemigroup[B]): A |*| B -⚬ B |*| A |*| B
def injectLOnPong[A, B]: A -⚬ Pong |*| A |+| B
def injectLWhenDone[A, B]: Done |*| A -⚬ Done |*| A |+| B
def injectLWhenNeed[A, B]: Need |*| A -⚬ Need |*| A |+| B
def injectROnPong[A, B]: B -⚬ Pong |*| A |+| B
def injectRWhenDone[A, B]: Done |*| B -⚬ A |+| Done |*| B
def injectRWhenNeed[A, B]: Need |*| B -⚬ Need |*| A |+| B
def lInvert[A, B](ev: Dual[A, B]): One -⚬ B |*| A
def lInvertChoice[A, B, Ȧ, Ḃ](lInvertA: One -⚬ Ȧ |*| A, lInvertB: One -⚬|*| B): One -⚬ Ȧ |&||*| A |+| B
def lInvertPair[A, B, Ȧ, Ḃ](lInvertA: One -⚬ Ȧ |*| A, lInvertB: One -⚬|*| B): One -⚬ Ȧ |*||*| A |*| B
def lInvertRec[F[_], G[_]](lInvertSub: [x, y] => (x$1: One -⚬ x |*| y) => One -⚬ F[x] |*| G[y]): One -⚬ Rec[F] |*| Rec[G]
def matchingChoiceLR[A, B, C, D]: A |+| B |*| C |&| D -⚬ A |*| C |+| B |*| 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.

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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

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

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

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.

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

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.

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

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.

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

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.

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

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.

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

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

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

def notifyNegFst[A](A: Negative[A]): Pong |*| A -⚬ A
def notifyNegSnd[A](A: Negative[A]): A |*| Pong -⚬ A
def notifyPosFst[A](A: Positive[A]): A -⚬ Ping |*| A
def notifyPosSnd[A](A: Positive[A]): A -⚬ A |*| Ping
def parFromOne[A, B](f: One -⚬ A, g: One -⚬ B): One -⚬ A |*| B
def parToOne[A, B](f: A -⚬ One, g: B -⚬ One): A |*| B -⚬ One
def pool[A, Ā](lInvert: One -⚬ Ā |*| A)(`evidence$21`: Positive[A]): LList1[A] -⚬ Unlimited[A |*| Ā] |*| LList1[A]

Present a non-empty list of resources A as an unlimited supply of "borrowed" resources A ⊗ Ā, where Ā is the dual of A. A borrowed resource A ⊗ Ā must be "returned" by "annihilating" A and its dual Ā, namely via an inversion on the right A ⊗ Ā -⚬ One. A returned resource will become available for further use when it signals readiness using the Signaling.Positive instance.

Present a non-empty list of resources A as an unlimited supply of "borrowed" resources A ⊗ Ā, where Ā is the dual of A. A borrowed resource A ⊗ Ā must be "returned" by "annihilating" A and its dual Ā, namely via an inversion on the right A ⊗ Ā -⚬ One. A returned resource will become available for further use when it signals readiness using the Signaling.Positive instance.

When all accesses to the pooled resources (obtained via the Unlimited[A |*| Ā] in the first out-port) are closed, the resources are returned in the second out-port.

def rInvert[A, B](ev: Dual[A, B]): A |*| B -⚬ One
def rInvertEither[A, B, Ȧ, Ḃ](rInvertA: A |*| Ȧ -⚬ One, rInvertB: B |*|-⚬ One): A |+| B |*| Ȧ |&|-⚬ One
def rInvertPair[A, B, Ȧ, Ḃ](rInvertA: A |*| Ȧ -⚬ One, rInvertB: B |*|-⚬ One): A |*| B |*| Ȧ |*|-⚬ One
def rInvertRec[F[_], G[_]](rInvertSub: [x, y] => (x$1: x |*| y -⚬ One) => F[x] |*| G[y] -⚬ One): Rec[F] |*| Rec[G] -⚬ One
def race[A, B](A: Positive[A], B: Positive[B]): A |*| B -⚬ A |*| B |+| A |*| B
def race[A, B, C](caseFstWins: A |*| B -⚬ C, caseSndWins: A |*| B -⚬ C)(`evidence$3`: Positive[A], `evidence$4`: Positive[B]): A |*| B -⚬ C
def raceAgainstL[A](A: Positive[A]): Done |*| A -⚬ A |+| A
def raceAgainstR[A](A: Positive[A]): A |*| Done -⚬ A |+| A

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.
def raceSignaledOrNot[A](A: Positive[A]): A -⚬ A |+| A
def raceWithL[X, A, B, C](caseFstWins: X |*| A |*| B -⚬ C, caseSndWins: X |*| A |*| B -⚬ C)(`evidence$5`: Positive[A], `evidence$6`: Positive[B]): X |*| A |*| B -⚬ C
def raceWithR[A, B, Y, C](caseFstWins: A |*| B |*| Y -⚬ C, caseSndWins: A |*| B |*| Y -⚬ C)(`evidence$7`: Positive[A], `evidence$8`: Positive[B]): A |*| B |*| Y -⚬ C
def rec2[A, B, C, D](f: (A -⚬ B, C -⚬ D) => A -⚬ B, g: (A -⚬ B, C -⚬ D) => C -⚬ D): (A -⚬ B, C -⚬ D)

Creates a pair of mutually recursive functions.

Creates a pair of mutually recursive functions.

def select[A, B](A: Negative[A], B: Negative[B]): A |*| B |&| A |*| B -⚬ A |*| B
def select[Z, A, B](caseFstWins: Z -⚬ A |*| B, caseSndWins: Z -⚬ A |*| B)(`evidence$13`: Negative[A], `evidence$14`: Negative[B]): Z -⚬ A |*| B
def selectAgainstL[A](A: Negative[A]): A |&| A -⚬ Need |*| A
def selectAgainstR[A](A: Negative[A]): A |&| A -⚬ A |*| Need

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.
def selectSignaledOrNot[A](A: Negative[A]): A |&| A -⚬ A
def selectWithL[Z, X, A, B](caseFstWins: Z -⚬ X |*| A |*| B, caseSndWins: Z -⚬ X |*| A |*| B)(`evidence$9`: Negative[A], `evidence$10`: Negative[B]): Z -⚬ X |*| A |*| B
def selectWithR[Z, A, B, Y](caseFstWins: Z -⚬ A |*| B |*| Y, caseSndWins: Z -⚬ A |*| B |*| Y)(`evidence$11`: Negative[A], `evidence$12`: Negative[B]): Z -⚬ A |*| B |*| Y
def sequence[A, B](`evidence$1`: Positive[A], `evidence$2`: Positive[B]): A |*| B -⚬ A |*| B

Alias for sequence_PP.

Alias for sequence_PP.

def sequence_NN[A, B](using A: Negative[A], B: Negative[B]): A |*| B -⚬ A |*| B
def sequence_NP[A, B](using A: Negative[A], B: Positive[B]): A |*| B -⚬ A |*| B
def sequence_PN[A, B](using A: Positive[A], B: Negative[B]): A |*| B -⚬ A |*| B
def sequence_PP[A, B](using A: Positive[A], B: Positive[B]): A |*| B -⚬ A |*| B
def signalNegFst[A](A: Negative[A]): Need |*| A -⚬ A
def signalNegSnd[A](A: Negative[A]): A |*| Need -⚬ A
def signalPosFst[A](A: Positive[A]): A -⚬ Done |*| A
def signalPosSnd[A](A: Positive[A]): A -⚬ A |*| Done
def snd[A, B, C](f: B -⚬ C): A |*| B -⚬ A |*| C
def subordinateFst[A, B, C, D]: A |*| B |&| C |*| D -⚬ A |+| C |*| B |&| D

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

def subordinateSnd[A, B, C, D]: A |*| B |&| C |*| D -⚬ A |&| C |*| 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).

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

def testBy[A, B, K](aKey: Getter[A, K], bKey: Getter[B, K], pred: K |*| K -⚬ Bool)(`evidence$15`: Cosemigroup[K], `evidence$16`: Positive[K]): A |*| B -⚬ A |*| B |+| A |*| B

Concrete fields

val dsl: DSL

Implicits

Implicits

implicit def choiceEitherDuality[A, B, Ȧ, Ḃ](a: Dual[A, Ȧ], b: Dual[B, Ḃ]): Dual[A |&| B, Ȧ |+| Ḃ]
implicit def doneNeedDuality: Dual[Done, Need]
implicit def eitherChoiceDuality[A, B, Ȧ, Ḃ](a: Dual[A, Ȧ], b: Dual[B, Ḃ]): Dual[A |+| B, Ȧ |&| Ḃ]
implicit def fstFunctor[B]: Transportive[[x] =>> x |*| B]
implicit val idFunctor: Transportive[Id]
implicit def oneSelfDual: Dual[One, One]
implicit val pairBifunctor: Bifunctor[|*|]
implicit def pairDuality[A, B, Ȧ, Ḃ](a: Dual[A, Ȧ], b: Dual[B, Ḃ]): Dual[A |*| B, Ȧ |*| Ḃ]
implicit def sndFunctor[A]: Transportive[[x] =>> A |*| x]