"TypeSpecifier" (Compiled Type)

"TypeSpecifier"::[t]

is a type representing another type t.

Details

  • The relationship between "TypeSpecifier"::["MachineInteger"] and "MachineInteger" is analogous to the relationship between the expression TypeSpecifier["MachineInteger"] and the numeric expression 2.
  • Terms with a "TypeSpecifier" type can be stored in variables and passed to functions.
  • The "TypeSpecifier" type can be used to define functions that accept types as arguments, such as Cast.
  • The "TypeSpecifier" type is only used for manipulation by the type system.

Constructors

  • TypeSpecifier[t] constructs an object with type "TypeSpecifier"::[t].
  • t must be fully resolvable at compilation time.
  • TypeOf[x] returns the type of the object x.

Conversions

    Expressions

  • Expressions of the form TypeSpecifier[t] are converted to and from the type "TypeSpecifier"::[t].

Examples

open allclose all

Basic Examples  (2)

Compile a program that returns a "TypeSpecifier" type:

Store a "TypeSpecifier" type in a variable for use in a later evaluation:

Scope  (1)

Use TypeOf inside of a call to TypeSpecifier: