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

Type members

Classlikes

object **

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
**.type
object RefCounted

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
RefCounted.type
object Val

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Val.type

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)(using 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 decrement: Val[Int] -⚬ Done |+| Val[Int]
def delayRandomMs(minMs: Int, maxMs: Int): Done -⚬ Done
def delayVal[A](by: Done -⚬ Done): Val[A] -⚬ Val[A]
def delayVal[A](by: FiniteDuration): Val[A] -⚬ Val[A]
def delayValRandomMs[A](minMs: Int, maxMs: Int): 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: ScalaFun[R, B]): Res[R] -⚬ Res[R] |*| Val[B]
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]])(using ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def gtBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(using ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def gteqBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(using ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def isEq[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def isGt[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def isGteq[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def isLt[A](using ord: Ordering[A]): Val[A] |*| Val[A] -⚬ Bool
def isLteq[A](using 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 liftScalaList1[A]: Val[::[A]] -⚬ LList1[Val[A]]
def ltBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(using ord: Ordering[K]): A |*| B -⚬ A |*| B |+| A |*| B
def lteqBy[A, B, K](aKey: Getter[A, Val[K]], bKey: Getter[B, Val[K]])(using 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.

Value parameters

init

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

Attributes

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: ScalaFun[R, (S, T)], release1: Option[ScalaFun[S, Unit]], release2: Option[ScalaFun[T, Unit]]): Res[R] -⚬ Res[S] |*| Res[T]
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 toScalaList1[A]: LList1[Val[A]] -⚬ Val[::[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 tryEffectAcquireWr[R, A, S, E](f: ScalaFun[(R, A), Either[E, S]], release: Option[ScalaFun[S, Unit]]): Res[R] |*| Val[A] -⚬ Res[R] |*| Val[E] |+| Res[S]
def unliftBoolean: Bool -⚬ Val[Boolean]

Concrete fields

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

Givens

Givens

given closeableCosemigroupVal[A]: closeableCosemigroupVal[A]
given given_Comparable_Val_Val[A : Ordering]: given_Comparable_Val_Val[A]
given given_NMonoid_Neg[A]: given_NMonoid_Neg[A]
given junctionNeg[A]: junctionNeg[A]
given junctionVal[A]: Positive[Val[A]]
given negValDuality[A]: Dual[Neg[A], Val[A]]
given signalingNeg[A]: signalingNeg[A]
given signalingVal[A]: Positive[Val[A]]
given valNegDuality[A]: valNegDuality[A]

Extensions

Extensions

extension [R](r: $[Res[R]])(using LambdaContext)
def releaseOnPing(p: $[Ping])(using SourcePos): $[Done]
def releaseWhen(d: $[Done])(using SourcePos): $[Done]

Deprecated extensions

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

Attributes

Deprecated
true
def **[B](b: $[Val[B]])(using SourcePos): $[Val[(A, B)]]