Package net.hydromatic.morel.type
Class Keys
java.lang.Object
net.hydromatic.morel.type.Keys
Type keys.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classKey of a type that applies a parameterized type to specific type arguments.static classKey that identifies adatatypescheme.private static classKey of a forall type.private static classKey that identifies a type by name.private static classKey of a type that applies a built-in type constructor to specific type arguments.private static classKey that identifies a type by ordinal.private static classprivate static classKey of a record type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Type.KeyReturns a key that applies a polymorphic type to arguments.static Keys.DataTypeKeydatatype(String name, List<? extends Type.Key> arguments, SortedMap<String, Type.Key> typeConstructors) Returns a key that identifies aDataType.(package private) static StringBuilderdescribeRecordType(StringBuilder buf, int left, int right, SortedMap<String, Type.Key> argNameTypes, Op op) Describes a record, progressive record, or tuple type.static Type.Keydummy()Returns a key to the dummy type.static Type.KeyReturns a key that identifies aFnType.static Type.KeyReturns a key that identifies aForallType.static Type.KeyReturns a key that identifies aListType.static Type.KeyReturns a key that identifies types by name.static Type.Keyordinal(int ordinal) Returns a key that identifies types (especiallytype variables) by ordinal.ordinals(int size) Returns a list of keys for type variables 0 through size - 1.static Type.KeyprogressiveRecord(SortedMap<String, ? extends Type.Key> argNameTypes) Returns a key that identifies aProgressiveRecordType.static Type.KeyReturns a key that identifies aRecordType(or aTupleTypeif the field names are ascending integers, orunitif the fields are empty).Converts a list of types to a list of keys.Converts a map of types to a map of keys.static Type.KeytoProgressive(Type.Key key) Converts a record key to a progressive record key, leaves other keys unchanged.static Type.KeyReturns a key that identifies aTupleType.
-
Constructor Details
-
Keys
private Keys()
-
-
Method Details
-
name
Returns a key that identifies types by name. -
dummy
Returns a key to the dummy type. -
ordinal
Returns a key that identifies types (especiallytype variables) by ordinal. -
ordinals
Returns a list of keys for type variables 0 through size - 1.- See Also:
-
apply
Returns a key that applies a polymorphic type to arguments. -
record
Returns a key that identifies aRecordType(or aTupleTypeif the field names are ascending integers, orunitif the fields are empty). -
tuple
Returns a key that identifies aTupleType. -
progressiveRecord
Returns a key that identifies aProgressiveRecordType. -
fn
Returns a key that identifies aFnType. -
list
Returns a key that identifies aListType. -
forall
Returns a key that identifies aForallType. -
datatype
public static Keys.DataTypeKey datatype(String name, List<? extends Type.Key> arguments, SortedMap<String, Type.Key> typeConstructors) Returns a key that identifies aDataType. -
toKeys
Converts a map of types to a map of keys. -
toKeys
Converts a list of types to a list of keys. -
describeRecordType
static StringBuilder describeRecordType(StringBuilder buf, int left, int right, SortedMap<String, Type.Key> argNameTypes, Op op) Describes a record, progressive record, or tuple type. -
toProgressive
Converts a record key to a progressive record key, leaves other keys unchanged.
-