Init

trait Init[ScopeType]
class Object
trait Matchable
class Any

Type members

Classlikes

final class Compiled[A1](val key: ScopedKey[A1], val dependencies: Iterable[ScopedKey[_]], val settings: Seq[Setting[A1]])
final class Flattened(val key: ScopedKey[_], val dependencies: Iterable[ScopedKey[_]])
object Initialize
Companion:
class
sealed trait Initialize[A1]

Abstractly defines a value of type A1.

Abstractly defines a value of type A1.

Specifically it defines a node in a task graph, where the dependencies represents dependent nodes, and evaluate represents the calculation based on the existing body of knowledge.

Type parameters:
A1

the type of the value this defines.

Companion:
object
sealed trait Keyed[S, A1] extends Initialize[A1]

An Initialize[T] associated with a ScopedKey[S].

An Initialize[T] associated with a ScopedKey[S].

Type parameters:
S

the type of the associated ScopedKey

T

the type of the value this Initialize defines.

trait KeyedInitialize[A1] extends Keyed[A1, A1]

A Keyed where the type of the value and the associated ScopedKey are the same.

A Keyed where the type of the value and the associated ScopedKey are the same.

Type parameters:
A1

the type of both the value this Initialize defines and the type of the associated ScopedKey.

final class RuntimeUndefined(val undefined: Seq[Undefined]) extends RuntimeException
sealed case class ScopedKey[A](scope: ScopeType, key: AttributeKey[A]) extends KeyedInitialize[A]
sealed class Setting[A1] extends SettingsDefinition
final class SettingList(val settings: Seq[Setting[_]]) extends SettingsDefinition
Companion:
class
sealed trait SettingsDefinition
Companion:
object
final class Undefined
final class Uninitialized(val undefined: Seq[Undefined], val toString: String) extends Exception

Types

type CompiledMap = Map[ScopedKey[_], Compiled[_]]
type MapConstant = [a] => (x$1: ScopedKey[a]) => Option[a]
type MapScoped = [a] => (x$1: ScopedKey[a]) => ScopedKey[a]
type ScopeLocal = ScopedKey[_] => Seq[Setting[_]]
type SettingSeq[A] = Seq[Setting[A]]
type ValidateRef = [a] => (x$1: ScopedKey[a]) => ValidatedRef[a]
type ValidatedInit[A] = Either[Seq[Undefined], Initialize[A]]
type ValidatedRef[A] = Either[Undefined, ScopedKey[A]]

Value members

Abstract methods

The Show instance used when a detailed String needs to be generated. It is typically used when no context is available.

The Show instance used when a detailed String needs to be generated. It is typically used when no context is available.

Concrete methods

def Undefined(defining: Setting[_], referencedKey: ScopedKey[_]): Undefined
def Uninitialized(validKeys: Seq[ScopedKey[_]], delegates: ScopeType => Seq[ScopeType], keys: Seq[Undefined], runtime: Boolean)(implicit display: Show[ScopedKey[_]]): Uninitialized
def add[A1](m: ScopedMap, s: Setting[A1]): ScopedMap
def addLocal(init: Seq[Setting[_]])(implicit scopeLocal: ScopeLocal): Seq[Setting[_]]
def ap[A1, A2](ff: Initialize[A1 => A2])(in: Initialize[A1]): Initialize[A2]
def app[K[L[x]], A2](inputs: K[Initialize])(f: K[Id] => A2)(implicit alist: AList[K]): Initialize[A2]
def append[A1](ss: Seq[Setting[A1]], s: Setting[A1]): Seq[Setting[A1]]
def asFunction[A](s: Settings[ScopeType]): ScopedKey[A] => A
def asTransform(s: Settings[ScopeType]): [A] => (x$1: ScopedKey[A]) => Id[A]
def compiled(init: Seq[Setting[_]], actual: Boolean)(using delegates: ScopeType => Seq[ScopeType], scopeLocal: ScopeLocal, display: Show[ScopedKey[_]]): CompiledMap
def definedAtString(settings: Seq[Setting[_]]): String
def delegate(sMap: ScopedMap)(implicit delegates: ScopeType => Seq[ScopeType], display: Show[ScopedKey[_]]): ScopedMap
final def derive[A1](s: Setting[A1], allowDynamic: Boolean, filter: ScopeType => Boolean, trigger: AttributeKey[_] => Boolean, default: Boolean): Setting[A1]

Constructs a derived setting that will be automatically defined in every scope where one of its dependencies is explicitly defined and the where the scope matches filter. A setting initialized with dynamic dependencies is only allowed if allowDynamic is true. Only the static dependencies are tracked, however. Dependencies on previous values do not introduce a derived setting either.

Constructs a derived setting that will be automatically defined in every scope where one of its dependencies is explicitly defined and the where the scope matches filter. A setting initialized with dynamic dependencies is only allowed if allowDynamic is true. Only the static dependencies are tracked, however. Dependencies on previous values do not introduce a derived setting either.

def deriveAllowed[T](s: Setting[T], allowDynamic: Boolean): Option[String]
def empty(implicit delegates: ScopeType => Seq[ScopeType]): Settings[ScopeType]
def flatMap[A1, A2](in: Initialize[A1])(f: A1 => Initialize[A2]): Initialize[A2]
def flattenLocals(compiled: CompiledMap): Map[ScopedKey[_], Flattened]
def getValue[T](s: Settings[ScopeType], k: ScopedKey[T]): T
def grouped(init: Seq[Setting[_]]): ScopedMap
def guessIntendedScope(validKeys: Seq[ScopedKey[_]], delegates: ScopeType => Seq[ScopeType], key: ScopedKey[_]): Option[ScopedKey[_]]
def makeWithCompiledMap(init: Seq[Setting[_]])(using delegates: ScopeType => Seq[ScopeType], scopeLocal: ScopeLocal, display: Show[ScopedKey[_]]): (CompiledMap, Settings[ScopeType])
def map[A1, A2](in: Initialize[A1])(f: A1 => A2): Initialize[A2]
def mapScope(f: ScopeType => ScopeType): MapScoped
def optional[A1, A2](i: Initialize[A1])(f: Option[A1] => A2): Initialize[A2]
def pure[A1](value: () => A1): Initialize[A1]
def refinedDistance(delegates: ScopeType => Seq[ScopeType], a: ScopedKey[_], b: ScopedKey[_]): Option[Int]
def setting[A1](key: ScopedKey[A1], init: Initialize[A1], pos: SourcePosition): Setting[A1]
def showUndefined(u: Undefined, validKeys: Seq[ScopedKey[_]], delegates: ScopeType => Seq[ScopeType])(implicit display: Show[ScopedKey[_]]): String
def sort(cMap: CompiledMap): Seq[Compiled[_]]
def uniform[A1, A2](inputs: Seq[Initialize[A1]])(f: Seq[A1] => A2): Initialize[A2]
def update[A1](key: ScopedKey[A1])(f: A1 => A1): Setting[A1]
def value[A1](value: => A1): Initialize[A1]
def valueStrict[A1](value: A1): Initialize[A1]

Deprecated methods

@deprecated("Use makeWithCompiledMap", "1.4.0")
def make(init: Seq[Setting[_]])(using delegates: ScopeType => Seq[ScopeType], scopeLocal: ScopeLocal, display: Show[ScopedKey[_]]): Settings[ScopeType]
Deprecated

Concrete fields

lazy val capturedTransformations: Initialize[[x] => (x$1: Initialize[x]) => Initialize[x]]

The result of this initialization is the composition of applied transformations. This can be useful when dealing with dynamic Initialize values.

The result of this initialization is the composition of applied transformations. This can be useful when dealing with dynamic Initialize values.

Extensions

Extensions

extension (f: [x] => (x$1: ValidatedInit[x]) => Initialize[x])
def composeVI(g: [x] => (x$1: Initialize[x]) => ValidatedInit[x]): [x] => (x$1: Initialize[x]) => Initialize[x]
extension (f: [x] => (x$1: Initialize[x]) => Initialize[x])
def (g: [x] => (x$1: Initialize[x]) => Initialize[x]): [x] => (x$1: Initialize[x]) => Initialize[x]