Modifier

sealed class Modifier

Types

Link copied to clipboard
object Abstract : TypeTag.Modifier

An indicator that the TypeTag has no direct instances.

Link copied to clipboard
class Co(    val name: String,     val part: AvailObject.() -> A_BasicObject? = null,     val traverse: A_Type.() -> A_Type) : TypeTag.Modifier.Variant

A Covariant relationship. When a TypeTag declares such a relationship, then for all A and B having that TypeTag, if A ⊆ B, then traverse(A) ⊆ traverse(B), where traverse is a function provided by the Co instance.

Link copied to clipboard
class Contra(val name: String, val traverse: A_Type.() -> A_Type) : TypeTag.Modifier.Variant

A Contravariant relationship. When a TypeTag declares such a relationship, then for all A and B having that TypeTag, if A ⊆ B, then traverse(B) ⊆ traverse(A), where traverse is a function provided by the Contra instance.

Link copied to clipboard
class Sup(val value: () -> A_Type) : TypeTag.Modifier

Every TypeTag has a (potentially infinite) collection of values that use that tag. This specifies a lambda that produces the least upper bound A_Type that constrains all those values.

Link copied to clipboard
class Unique(val value: () -> A_BasicObject) : TypeTag.Modifier

An indicator that the TypeTag has exactly one instance. A lambda to produce that instance is provided, and will be executed once, when first requested.

Link copied to clipboard
abstract class Variant(val name: String, val traverse: A_Type.() -> A_Type) : TypeTag.Modifier

The mechanism for expressing covariant and contravariant relationships for types. Each TypeTag that represents a region of the type lattice can define Covariant and Contravariant relations that apply to types that have that TypeTag.

Functions

Link copied to clipboard
abstract fun applyTo(typeTag: TypeTag)

Adjust the TypeTag to accommodate this modifier.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard