Variant
abstract class Variant(val name: String, val traverse: A_Type.() -> A_Type) : TypeTag.Modifier
Content copied to clipboard
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.
Constructors
Functions
Properties
Link copied to clipboard
A function that extracts a co-/contravariant type from the original type, where this Variant is applicable. For example, given something with the tag SET_TYPE_TAG (the TypeTag for set types), the set type's element type can be extracted by running the traverse function of the "element" covariant type parameter.