Skip to content

Type Checking

Andrew Matthews edited this page Aug 30, 2025 · 1 revision

tags:

  • fifth/typesystem date: 2024-10-06

Requirements

  1. A way to represent a type definition for all #primitive-type and #user-defined-type types
  2. A way to represent a state of not yet having a type allocated
  3. A way to represent a provisional type allocation
  4. A way to widen the type allocation based on new evidence
  5. A way to represent a generic type
  6. A way to represent type constraints (such as on a generic type parameter)
  7. A way to represent the fact that type allocation is not applicable, for syntactic elements that are not type definitions or expressions

Basic Assumptions

  1. Type checking is done on all expressions.
  2. A member access is just a binary operator with a #user-defined-type as the first parameter and a #property-reference as the second.
  3. A type is created on the definition of a #user-defined-type

See Also

Clone this wiki locally