Companion

object Companion

Properties

Link copied to clipboard

The most general tuple type.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

The metatype for all tuple types.

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

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

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

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

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