Package net.hydromatic.morel.type
Class Keys
- java.lang.Object
-
- net.hydromatic.morel.type.Keys
-
public class Keys extends Object
Type keys.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classKeys.ApplyKeyKey of a type that applies a parameterized type to specific type arguments.static classKeys.DataTypeDefInformation from which a data type can be created.private static classKeys.DataTypeKeyKey that identifies adatatypescheme.private static classKeys.ForallKeyKey of a forall type.private static classKeys.ForallTypeApplyKeyKey that applies several type arguments to adatatypescheme.private static classKeys.NameKeyKey that identifies a type by name.private static classKeys.OpKeyKey of a type that applies a built-in type constructor to specific type arguments.private static classKeys.OrdinalKeyKey that identifies a type by ordinal.private static classKeys.RecordKeyKey of a record type.
-
Constructor Summary
Constructors Modifier Constructor Description privateKeys()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Type.Keyapply(ParameterizedType type, Iterable<? extends Type> argTypes)Returns a key that identifies anApplyType.static Type.Keyapply(ParameterizedType type, Type... argTypes)Returns a key that identifies anApplyType, with an array of types.static Type.Keydatatype(String name)Returns a key that identifies aDataType.static Keys.DataTypeDefdataTypeDef(String name, List<? extends Type> parameterTypes, SortedMap<String,Type> tyCons, boolean scheme)Returns a definition of aDataType.static Type.Keyfn(Type paramType, Type resultType)Returns a key that identifies aFnType.static Type.Keyforall(Type type, List<TypeVar> parameterTypes)Returns a key that identifies aForallType.static Type.KeyforallTypeApply(ForallType forallType, List<? extends Type> argTypes)Returns a key that identifies aForallTypewith monomorphic types substituted for its type parameters.static Type.Keylist(Type elementType)Returns a key that identifies aListType.static Type.Keyname(String name)Returns a key that identifies types by name.static Type.Keyordinal(int ordinal)Returns a key that identifies types (especiallytype variables) by ordinal.static Type.Keyrecord(SortedMap<String,Type> argNameTypes)Returns a key that identifies aRecordType(or aTupleTypeif the field names are ascending integers, orunitif the fields are empty).static Type.Keytuple(List<? extends Type> argTypes)Returns a key that identifies aTupleType.
-
-
-
Method Detail
-
ordinal
public static Type.Key ordinal(int ordinal)
Returns a key that identifies types (especiallytype variables) by ordinal.
-
apply
public static Type.Key apply(ParameterizedType type, Type... argTypes)
Returns a key that identifies anApplyType, with an array of types.
-
apply
public static Type.Key apply(ParameterizedType type, Iterable<? extends Type> argTypes)
Returns a key that identifies anApplyType.
-
record
public static Type.Key record(SortedMap<String,Type> argNameTypes)
Returns a key that identifies aRecordType(or aTupleTypeif the field names are ascending integers, orunitif the fields are empty).
-
tuple
public static Type.Key tuple(List<? extends Type> argTypes)
Returns a key that identifies aTupleType.
-
fn
public static Type.Key fn(Type paramType, Type resultType)
Returns a key that identifies aFnType.
-
forall
public static Type.Key forall(Type type, List<TypeVar> parameterTypes)
Returns a key that identifies aForallType.
-
forallTypeApply
public static Type.Key forallTypeApply(ForallType forallType, List<? extends Type> argTypes)
Returns a key that identifies aForallTypewith monomorphic types substituted for its type parameters.
-
-