Companion

object Companion

Functions

Link copied to clipboard
fun mappingElementTypes(aTupleType: A_Type, elementTransformer: (A_Type) -> A_Type): A_Type

Transform a tuple type into another tuple type by transforming each of the element types. Assume the transformation is stable. The resulting tuple type should have the same size range as the input tuple type, except if normalization produces bottom.

Link copied to clipboard
fun oneOrMoreOf(aType: A_Type): A_Type

Answer a tuple type consisting of one or more of the given element type.

Link copied to clipboard
fun tupleTypeForSizesTypesDefaultType(    sizeRange: A_Type,     typeTuple: A_Tuple,     defaultType: A_Type): A_Type

Create the tuple type specified by the arguments. The size range indicates the allowable tuple sizes for conforming tuples, the type tuple indicates the types of leading elements (if a conforming tuple is long enough to include those indices), and the default type is the type of the remaining elements. Canonize the tuple type to the simplest representation that includes exactly those tuples that a naive tuple type constructed from these parameters would include. In particular, if no tuples are possible then answer bottom, otherwise remove any final occurrences of the default from the end of the type tuple, trimming it to no more than the maximum size in the range.

Link copied to clipboard
fun tupleTypeForTypes(vararg types: A_Type): A_Type

Answer a fixed size tuple type consisting of the given element types.

Link copied to clipboard
fun tupleTypeForTypesList(types: List<A_Type>): A_Type

Answer a fixed size tuple type consisting of the given element types.

Link copied to clipboard
fun zeroOrMoreOf(aType: A_Type): A_Type

Answer a tuple type consisting of zero or more of the given element type.

Link copied to clipboard
fun zeroOrOneOf(aType: A_Type): A_Type

Answer a tuple type consisting of either zero or one occurrences of the given element type.

Properties

Link copied to clipboard
val mostGeneralTupleType: A_Type

The most general tuple type.

Link copied to clipboard
val nonemptyStringType: A_Type

The most general string type (i.e., tuples of characters).

Link copied to clipboard
val stringType: A_Type

The most general string type (i.e., tuples of characters).

Link copied to clipboard
val tupleMeta: A_Type

The metatype for all tuple types.

Link copied to clipboard
val tupleTypesForTypesArrayMethod: CheckedMethod

Access the method tupleTypeForTypes.

Link copied to clipboard
val tupleTypesForTypesListMethod: CheckedMethod

Access the method tupleTypeForTypes.