Enum BuiltIn.Datatype

java.lang.Object
java.lang.Enum<BuiltIn.Datatype>
net.hydromatic.morel.compile.BuiltIn.Datatype
All Implemented Interfaces:
Serializable, Comparable<BuiltIn.Datatype>, java.lang.constant.Constable, BuiltIn.BuiltInType
Enclosing class:
BuiltIn

public static enum BuiltIn.Datatype extends Enum<BuiltIn.Datatype> implements BuiltIn.BuiltInType
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.

  • Enum Constant Details

    • DESCENDING

      public static final BuiltIn.Datatype DESCENDING
    • ORDER

      public static final BuiltIn.Datatype ORDER
    • OPTION

      public static final BuiltIn.Datatype OPTION
    • PSEUDO_LIST

      public static final BuiltIn.Datatype PSEUDO_LIST
      Analog of list for checking that matches are exhaustive. Owns the NIL and CONS type constructors.
    • PSEUDO_BOOL

      public static final BuiltIn.Datatype PSEUDO_BOOL
      Analog of bool for checking that matches are exhaustive. Owns the FALSE and TRUE type constructors.
    • OVERLOAD

      public static final BuiltIn.Datatype OVERLOAD
      The type of the value created by an over declaration.

      After "o", o has type overload. The type system will then allow subsequent val inst o declarations.

  • Field Details

  • Constructor Details

  • Method Details

    • values

      public static BuiltIn.Datatype[] 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

      public static BuiltIn.Datatype valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • mlName

      public String mlName()
      Specified by:
      mlName in interface BuiltIn.BuiltInType
    • varCount

      public int varCount()
      Specified by:
      varCount in interface BuiltIn.BuiltInType
    • isInternal

      public boolean isInternal()
      Specified by:
      isInternal in interface BuiltIn.BuiltInType