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.

order and option are non-internal.

The two internal datatypes,


 datatype 'a list = NIL | CONS of ('a * 'a list);
 datatype bool = FALSE | TRUE;
 

are not available from within programs but used for internal purposes.

  • Enum Constant Details

    • ORDER

      public static final BuiltIn.Datatype ORDER
    • OPTION

      public static final BuiltIn.Datatype OPTION
    • LIST

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

      public static final BuiltIn.Datatype BOOL
      Analog of bool for checking that matches are exhaustive. Owns the FALSE and TRUE type constructors.
  • 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
    • transform

      Specified by:
      transform in interface BuiltIn.BuiltInType
    • isInternal

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