The type system for Laurel programs.
HighType covers primitive types (TVoid, TBool, TInt, TReal, TFloat64,
TString), internal types used by the heap parameterization pass (THeap,
TTypedField), collection types (TSet), user-defined types (UserDefined),
generic applications (Applied), value types (Pure), and intersection types
(Intersection).
Constructors
TVoid : HighType
The void type, used for statements that produce no value.
TBool : HighType
Boolean type.
TInt : HighType
Arbitrary-precision integer type.
TFloat64 : HighType
64-bit floating point type. Required for JavaScript (number), also used by Python (float) and Java (double).
TReal : HighType
Mathematical real type. Maps to Core's real type.
TString : HighType
String type for text data.
THeap : HighType
Internal type representing the heap. Introduced by the heap parameterization pass; not accessible via grammar.
TTypedField (valueType : AstNode HighType) : HighType
Internal type for a field constant with a known value type. Introduced by the heap parameterization pass; not accessible via grammar.
UserDefined (name : Identifier) : HighType
A Identifier to a user-defined composite or constrained type by name.
Applied (base : AstNode HighType) (typeArguments : List (AstNode HighType)) : HighType
A generic type application, e.g. List<Int>.
Pure (base : AstNode HighType) : HighType
A pure (value) variant of a composite type that uses structural equality instead of reference equality.
Intersection (types : List (AstNode HighType)) : HighType
An intersection of types. Used for implicit intersection types, e.g. Scientist & Scandinavian.
TBv (size : Nat) : HighType
Bitvector type of a given width.
TCore (s : String) : HighType
Temporary construct meant to aid the migration of Python->Core to Python->Laurel. Type "passed through" from Core. Intended to allow translations to Laurel to refer directly to Core.
Unknown : HighType
Type used internally by the Laurel compilation pipeline. This type is used when a resolution error occurs, to continue compilation without producing superfluous errors Any type can be assigned to unknown and unknown can be assigned to any type. The unknown type can not be represented in Core so its occurence will abort compilation before evaluating Core