Package net.hydromatic.morel.compile
Enum BuiltIn.Datatype
- All Implemented Interfaces:
Serializable,Comparable<BuiltIn.Datatype>,java.lang.constant.Constable,BuiltIn.BuiltInType
- Enclosing class:
BuiltIn
Built-in datatype.
The following datatypes are non-internal:
datatype descending = DESC of 'a;
datatype order = LESS | EQUAL | GREATER;
datatype option 'a = NONE | SOME of 'a;
The three internal datatypes,
datatype 'a list = NIL | CONS of ('a * 'a list);
datatype bool = FALSE | TRUE;
datatype overload;
are not available from within programs but used for internal purposes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe type of the value created by anoverdeclaration.Analog ofboolfor checking that matches are exhaustive.Analog oflistfor checking that matches are exhaustive. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final Stringprivate final UnaryOperator<BuiltIn.DataTypeHelper> private final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDatatype(String mlName, boolean internal, int varCount, UnaryOperator<BuiltIn.DataTypeHelper> transform) -
Method Summary
Modifier and TypeMethodDescriptionbooleanmlName()static BuiltIn.DatatypeReturns the enum constant of this type with the specified name.static BuiltIn.Datatype[]values()Returns an array containing the constants of this enum type, in the order they are declared.intvarCount()
-
Enum Constant Details
-
DESCENDING
-
ORDER
-
OPTION
-
PSEUDO_LIST
Analog oflistfor checking that matches are exhaustive. Owns theNILandCONStype constructors. -
PSEUDO_BOOL
Analog ofboolfor checking that matches are exhaustive. Owns theFALSEandTRUEtype constructors. -
OVERLOAD
The type of the value created by anoverdeclaration.After "
o",ohas typeoverload. The type system will then allow subsequentval inst odeclarations.
-
-
Field Details
-
mlName
-
internal
private final boolean internal -
varCount
private final int varCount -
transform
-
-
Constructor Details
-
Datatype
private Datatype(String mlName, boolean internal, int varCount, UnaryOperator<BuiltIn.DataTypeHelper> transform)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
mlName
- Specified by:
mlNamein interfaceBuiltIn.BuiltInType
-
varCount
public int varCount()- Specified by:
varCountin interfaceBuiltIn.BuiltInType
-
isInternal
public boolean isInternal()- Specified by:
isInternalin interfaceBuiltIn.BuiltInType
-