ScalettoLib

libretto.scaletto.ScalettoLib
See theScalettoLib companion object
opaque class ScalettoLib[DSL <: Scaletto, CoreLib <: CoreLib[DSL]](val dsl: DSL, val coreLib: CoreLib & CoreLib[DSL])

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Classlikes

object RefCounted

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object Val

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Val.type
object ValMatcher

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait ValMatcher[-U >: V, V, A, R]

Utility to construct a Libretto program that branches based on a Scala value inside a Val.

Utility to construct a Libretto program that branches based on a Scala value inside a Val.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ValMatcher[U, V, A, R]

Types

opaque type RefCounted[R]

Value members

Concrete methods

def acquire0[A, R](acquire: A => R, release: Option[R => Unit]): Val[A] -⚬ Res[R]

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 acquireAsync0[A, R](acquire: A => Async[R], release: Option[R => Async[Unit]]): Val[A] -⚬ Res[R]

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: Val[String] -⚬ Val[String]
def alsoPrintLine[A](f: A => String): Val[A] -⚬ Val[A]
def alsoPrintLine[A](s: String)(implicit S: Positive[A], J: Positive[A]): A -⚬ A
def const[A](a: A): One -⚬ Val[A]
def constList[A](as: List[A]): One -⚬ LList[Val[A]]
def constList1[A](a: A, as: List[A]): Done -⚬ LList1[Val[A]]
def constList1[A](as: ::[A]): Done -⚬ LList1[Val[A]]
def constList1Of[A](a: A, as: A*): Done -⚬ LList1[Val[A]]
def constListOf[A](as: A*): One -⚬ LList[Val[A]]
def constListOf1[A](a: A, as: A*): Done -⚬ LList[Val[A]]
def delayVal[A](by: Done -⚬ Done): Val[A] -⚬ Val[A]
def delayVal[A](by: FiniteDuration): Val[A] -⚬ Val[A]
def effect0[R](f: R => Unit): Res[R] -⚬ Res[R]

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 effectAsync0[R](f: R => Async[Unit]): Res[R] -⚬ Res[R]

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]
def equivBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(implicit ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def gtBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(implicit ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def gteqBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(implicit ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def isEq[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def isGt[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def isGteq[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def isLt[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def isLteq[A](implicit ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def liftBipredicate[A, B](p: (A, B) => Boolean): Val[A] |*| Val[B] -⚬ Bool
def liftBoolean: Val[Boolean] -⚬ Bool
def ltBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(implicit ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def lteqBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(implicit ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def mVal[A, R](init: A => R): Val[A] -⚬ Res[R]

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 maybeToOption[A]: Maybe[Val[A]] -⚬ Val[Option[A]]
def mergeDemands[A]: Neg[A] |*| Neg[A] -⚬ Neg[A]
def optionToPMaybe[A]: Val[Option[A]] -⚬ PMaybe[Val[A]]
def pMaybeToOption[A]: PMaybe[Val[A]] -⚬ Val[Option[A]]
def printLine: Val[String] -⚬ Done
def printLine(s: String): Done -⚬ Done
def printLine[A](f: A => String): Val[A] -⚬ Done
def putStr: Val[String] -⚬ Done
def putStr(s: String): Done -⚬ Done
def readLine: Done -⚬ Val[String]
def release0[R, B](release: R => B): Res[R] -⚬ Val[B]

Variant of release that does not take additional input.

Variant of release that does not take additional input.

Attributes

def releaseAsync0[R, B](release: R => Async[B]): Res[R] -⚬ Val[B]

Variant of releaseAsync that does not take additional input.

Variant of releaseAsync that does not take additional input.

Attributes

def sortBy[A, B, K : Ordering](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]]): A |*| B -⚬ A |*| B |+| B |*| A
def splitResource0[R, S, T](f: R => (S, T), release1: Option[S => Unit], release2: Option[T => Unit]): Res[R] -⚬ Res[S] |*| Res[T]
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]
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
def toScalaList[A]: LList[Val[A]] -⚬ Val[List[A]]
def transformResource0[R, S](f: R => S, release: Option[S => Unit]): Res[R] -⚬ Res[S]

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 transformResourceAsync0[R, S](f: R => Async[S], release: Option[S => Async[Unit]]): Res[R] -⚬ Res[S]

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 unliftBoolean: Bool -⚬ Val[Boolean]

Concrete fields

val coreLib: CoreLib & CoreLib[DSL]
val dsl: DSL

Extensions

Extensions

extension [A](a: $[Val[A]])
def *[B](b: $[Val[B]]): $[Val[(A, B)]]

Implicits

Implicits

implicit def comparableVal[A](implicit A: Ordering[A]): Comparable[Val[A], Val[A]]
implicit def junctionNeg[A]: Negative[Neg[A]]
implicit def junctionVal[A]: Positive[Val[A]]
implicit def nMonoidNeg[A]: NMonoid[Neg[A]]
implicit def negValDuality[A]: Dual[Neg[A], Val[A]]
implicit def pComonoidVal[A]: PComonoid[Val[A]]
implicit def signalingNeg[A]: Negative[Neg[A]]
implicit def signalingVal[A]: Positive[Val[A]]
implicit def valNegDuality[A]: Dual[Val[A], Neg[A]]