Expand description
§The Conlang Type Checker
As a statically typed language, Conlang requires a robust type checker to enforce correctness.
This crate is a major work-in-progress.
§The Table™
A directed graph of nodes and their dependencies.
Contains item definitions and type expression information.
Every item is itself a module, and can contain arbitrarily nested items as part of the item graph
The table, additionally, has some queues for use in external algorithms, detailed in the stage module.
§Namespaces
Each item in the graph is given its own namespace, which is further separated into two distinct parts:
- Children of an item are direct descendents (i.e. their
parent
is a handle to the item) - Imports of an item are indirect descendents created by
use
orimpl
directives. They are shadowed by Children with the same name.
§Order of operations:
For order-of-operations information, see the stage module.
Modules§
- Holds the Source of a definition in the AST
- Type collection, evaluation, checking, and inference passes.
- The Table is a monolithic data structure representing everything the type checker knows about a program.
- A TypeExpression is a syntactic representation of a TypeKind, and is used to construct type bindings in a Table’s typing context.