Class TupleType

    • Field Detail

      • INT_STRINGS

        private static final String[] INT_STRINGS
      • argTypes

        public final List<Type> argTypes
    • Constructor Detail

      • TupleType

        TupleType​(com.google.common.collect.ImmutableList<Type> argTypes)
    • Method Detail

      • key

        public Type.Key key()
        Description copied from interface: Type
        Description of the type, e.g. "int", "int -> int", "NONE | SOME of 'a".
        Specified by:
        key in interface Type
      • copy

        public TupleType copy​(TypeSystem typeSystem,
                              UnaryOperator<Type> transform)
        Description copied from interface: Type
        Copies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.
        Specified by:
        copy in interface Type
      • str

        private static String str​(int i)
        Converts an integer to its string representation, using a cached value if possible.
      • ordinalNames

        public static List<String> ordinalNames​(int size)
        Returns a list of strings ["1", ..., "size"].
      • toArgNameTypes

        static com.google.common.collect.ImmutableSortedMap<String,​Type> toArgNameTypes​(List<? extends Type> argTypes)
        Given a list of types [t1, t2, ..., tn] returns a sorted map ["1" : t1, "2" : t2, ... "n" : tn].